Image uploads - color profiles dropped

I think this is a bug, though maybe it is a feature to make the file size smaller?

I work in the photo industry, in our forum sometimes people post images for others to try to troubleshoot printing issues. The image uploaded could be in a color space other than sRGB like Adobe 98 or ProPhoto RGB.

If I post an image to our Discourse forum that is Adobe 98, when I download that image the profile has been stripped and now it is untagged which is really bad as there is no way to know what the original color space was.

Is this intended? is there a way to not remove the color profile?

1 Like

By default, image metadata is removed from uploads. However, there’s a site setting for this.

If you’d like the metadata to be preserved, search for strip_image_metadata in the settings and you should see this:

Capture7

Disabling this setting means the metadata will not be stripped from future image uploads.

7 Likes

Strip image metadata doesn’t mean the color profile should be ignored.

An image that loses its color gamut information is rendered as a different image. And this feature supports a very limited number of image formats.

For example, AVIF does not lose any image metadata, however, the resulting thumbnail is not color managed.

Refer to the image below. Please wait patiently for Discourse to load the preview image, then click to expand the original image. Note the color difference between the two.

2 Likes

You’re right! I checked this and the original has more intens reds, yellows, greens etc. I don’t have an answer for you but just confirming that I see what you see.

Interesting if this has always been an issue in Discourse. Is it just with avif files (a format I don’t use much myself) or are you able to see this with other more common formats?

This phenomenon is an example of image metadata loss. This loss isn’t limited to AVIF; metadata is stripped for all image formats supported by Discourse. AVIF was chosen because its thumbnails stripped image metadata, while original images are not processed.

This is actually due to two bugs:

  1. Discourse claims to strip metadata for all images, but in reality, it didn’t.

  2. Stripping metadata even removes color gamut information, compromising the color integrity of the image.