Recently I've noticed that when I upload pictures, the version that's stored on the site is different in filesize, leading me to believe they're being recompressed. Is that the case? There are some pictures people upload that are rare or old, and deserve to be preserved, it would be a shame if further lossy compression is being used on them, as it would mean GWM can no longer function as an archive site. (Videos on the other hand seem to be maintained with their original filesize as far as I can tell)
It doesn't seem to be just the EXIF data, as a recent example the full size of
" class="bbc_link" target="_blank" rel="noopener noreferrer">this pic on GWM is 133KB, whereas the original upload was 793KB. The quality difference isn't huge, but the original is definitely a littler clearer in the details. The weird thing is, I've also seen uploads where the filesize on the site is bigger than the original. I think you need to check whatever processing is being done on the uploaded images, because stripping out EXIF data shouldn't need to involve lossy recompression, but that seems to be what's happening.
I just confirmed, it seems like the majority of pics I've uploaded recently are actually larger in size on the site. I could maybe see compressing them down a bit to save server space/bandwith, but whatever is being done to them currently seems to be both lowering the image quality slightly and increasing the file size for most of them as opposed to just putting up the original JPEGs. Is something being changed in their formatting for the sake of faster automated duplicate searches or something?
When I get some time I'll rewrite it only resave when necessary.
Oh, thanks. Yeah, pretty much any time a JPEG is recompressed you lose quality even if the resulting file size is bigger, the best you can hope for is to not lose too much. I've got some pics I'm avoiding uploading right now because I don't want to spread degraded versions around, there are enough issues with that on the internet as it is. I haven't checked PNG uploads, but I assume those don't have the same issue, or are they being rewritten to JPEGs now?
I don't know the exact libraries you're using, but to my knowledge there are a number of them that support stripping EXIF data from JPEGs losslessly, without affecting the rest of the image data. It would probably save on CPU time that way too, since I believe it's a less intensive operation than having to recompress them.