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 个赞

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 个赞

剥离图像元数据并不意味着应忽略颜色配置文件。

失去色彩空间信息的图像将被渲染成不同的图像。此功能支持的图像格式非常有限。

例如,AVIF 不会丢失任何图像元数据,但生成的缩略图不进行颜色管理。

请参见下图。请耐心等待 Discourse 加载预览图像,然后单击以展开原始图像。请注意两者之间的颜色差异。

2 个赞

你说得对!我检查了一下,原始图像有更浓烈的红色、黄色、绿色等。我没有答案,但可以确认我看到和你一样的东西。

如果这是 Discourse 中一直存在的问题,那很有趣。这是仅与 avif 文件(我自己不常使用的格式)有关,还是你用其他更常见的格式也能看到这个问题?

此现象是图像元数据丢失的一个例子。这种丢失并非仅限于 AVIF;Discourse 支持的所有图像格式都会剥离元数据。选择 AVIF 是因为它缩略图剥离了图像元数据,而原始图像则未被处理。

这实际上是由于两个错误造成的:

  1. Discourse 声称会剥离所有图像的元数据,但实际上并未这样做。

  2. 剥离元数据甚至会移除色彩空间信息,损害图像的色彩完整性。