Stripping image metadata when composer media optimization is enabled?

I have the site setting strip image metadata turned off as I want to retain all the copyright info and very importantly, the embedded color profile. This worked okay in the past but recently the metadata seems to be getting stripped again. In the screenshot below you can see the color profile in the original (on the right) was sRGB which is what it should retain, instead it is RGB on the downloaded version on the left, which is very different. You can see all the other metadata was stripped as well. I’m not 100% sure this is a bug, but it sure seems to be. I’m assuming meta has this setting turned on so I won’t upload an image with a profile for testing unless I’m told differently. Thanks!

2 Likes

Did you enable the new composer media optimization setting? That will always strip EXIF.

2 Likes

That would be it, should have thought of that. What a huge bummer! Any chance this can be implemented or is that out of the realm? Thanks!

3 Likes

I have no plans on adding support for EXIF nor color profile. The idea of the feature was for basic day-to-day forums and I expect that any photographer community will never enable it as having heavyweight image files are a good thing for those folk.

1 Like

I respectfully disagree, having this for a photography community is perfect in my opinion. It allows members to upload any size file they want and not have to worry about it. We photographers often have larger jpg files sitting around already, so this takes a step out of our process to have to re-export them from Lightroom, Photoshop, etc. to some specific dimensions that are more suited for the web. Having heavyweight image files are not a good thing, they of course slow down the site which ruins the users experience if not on a blazing fast connection. Plus it also takes forever to upload a giant file which ruins the experience again. We don’t need giant files, we need files that look really good around 1500px with small file sizes. I would absolutely love to have this feature on our site with the option to retain metadata. I hope you will reconsider, I was super stoked about having this option on our site. :heart_eyes:

3 Likes

So there are two feature requests here: EXIF preservation and Colorspace preservation.

EXIF Preservation

It should be possible to make composer media optimization image enabled work without strip image metadata. We extract EXIF early in the pipeline and re-insert it on the end of it. That said I have found zero supported libraries to read and write EXIF easily in either JS or WASM. If someone fancies trying their hand on using the abandoned GitHub - hMatoba/piexifjs: Read and modify exif in client-side or server-side JavaScript. or trying to wasmify GitHub - paolobarbolini/img-parts: Low level crate for reading and writing Jpeg, Png and RIFF image containers I can only say pr-welcome .

Color Space

We use Canvas to convert the decoded image into a RGBA array. Canvas colorspace support is complicated. There is a WICG proposal to add support for fancier colorspaces but it’s not coming anytime soon.

4 Likes

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.