Once I switch it over all pages from CycleChat will be served via SSL and be secure, including any files and images that are served from the cyclechat.net domain.
Anything on a page that is from a non-https source will invalidate the overall security of the page ('break' it) from the point of view of the browser padlock - but it doesn't mean all of the content is insecure, just the content from the non-secure external source.
That being said, ideally we want everything to be secure on the page, so I had two options with regards to external images (pictures that are linked from other sites that aren't served over https):
- Proxy external images - the forum software downloads and stores a copy of the external image onto the CC server in its original file size. It then serves it via an internal proxy script, making sure the image comes from a secure source.
- Convert external images to attachments - takes a copy of the external image, resizes and compresses the file based on the max board dimensions (using a lossless algorithm to retain quality), and stores it on the CC server as a post attachment so it can be delivered securely by CC indefinitely.
Proxying caches an image the next time a thread/post is requested. This is reasonably efficient because you're not storing un-viewed images, but it also means that lots of images from older threads wouldn't be retained and may be lost. It also stores the source image at its original file size, so if there are lots of links to 10MB+ images it'll soon fill up the CC server. Such large images are overkill for what we need on CC and overly increase page download times. The proxy also doesn't serve the files using an image file extension, so doesn't cache as naturally as a native image file, so I decided to go for converting images to attachments.
Converting external images to attachments reduces image dimensions to a useful visual size (the larger of 1200 pixels wide / 900 pixels high) and reduces the physical file size to an average of around 30kb per image. It also ensures we serve the file as an image using whichever file extension it was originally uploaded as. This should be good for mobile users and also means images can be cached and served via the CDN (
Content Delivery Network) that we use to speed up page loading time for overseas visitors, keeping CC nice and fast for everyone. We also get to keep many of the still-available older linked images on the CC server, protecting posts from the removal of the source images.
For the past 48 hours the converter has been running in the background, going through millions of posts, converting external images to attachments. It should be finished shortly, so we'll be switching fairly soon.
If you need to link to a higher quality image for practical purposes, just post it as a web link and people can click on it and view the original image in their browser at the full size.
Cheers,
Shaun