I have a forum where, like most forums, users can post images. I've set up HTTPS across the site, but of course most external images are linked using HTTP, not HTTPS. So loading the forum over HTTPS shows mixed content warnings, etc.
What are some strategies for tackling this problem? Some of the images are from my own site so I can rewrite those URLs to use HTTPS since I know it will work. But for external URLs many don't work with HTTPS so I can't do a blanket rewrite.
I could rewrite non-secure images to links instead of inline images, but that doesn't look great and may be confusing for users. Any better solutions?
src="http://someimage.jpg"
to the relative structuredsrc="//someimage.jpg"
instead...or just validate it. If you want a strict green lock (where an insecure image wont wonk your lock) enforce HSTS. Then in the editor interface make a note that images currently must be available via HTTPS, else they will not show up at all. Something like "Oops, you made an error. To prevent abuse and MITM attacks, all media must use HTTPS. Go back and correct it, or choose another image provider.".