Last year, the thumbnailling process was enhanced (TinyRGB support for JPG uploads) to replace the standard sRGB embedded color profile with the TinyRGB (aka C2) profile from Facebook. This is because it is smaller and also Free. See also Thumbnails should embed tinyRGB instead of sRGB when they include that ICC profile.
However Facebook created that profile to solve a different problem -- to deal with images that lack an embedded color profile. Although the W3C standard expects browsers to assume sRGB when an embedded profile is missing (from JPG, PNG, CSS, etc) in fact all browsers (by default) will just assume the user's monitor profile in this case. While that is reasonable if the monitor is calibrated to sRGB colorspace, it is a bad assumption for anyone using a wide-gamut monitor. The result is that users with such monitors see gaudy over-saturated images on the web for sRGB images that lack an embedded color profile.
The problem is widespread since pretty much all JPG's created by cameras and smartphones lack an embedded color profile. Often it is only JPGs created by professional image software (Photoshop, Lightroom, etc) that are correctly saved with an included profile. There is further confusion since the problem is often described as affecting "untagged images". The JPG EXIF data has a ColorSpace tag which one might think would help. Its only valid values are 1=sRGB and 65535 = Uncalibrated. However all web browsers completely ignore this tag. See My Browser Test Page. The problem is really images that are sRGB but do not embed the sRGB color profile.
Additionally, many non-professional image programs strip off all color profile and EXIF data when saving JPGs. This leads to images that are almost certainly sRGB but lack any identifying attributes.
Although it is possible to configure Firefox to obey the W3C standard for untagged/unprofiled images (see above test page for details) this is not the out-of-the box experience, and all other browsers fail. For this reason, Facebook created TinyRGB so they could embed a color profile into every JPG at minimal cost. All desktop browsers respect the embedded color profile and display the image correctly, even on wide-gamut monitors.
I therefore propose a change to the TinyRGB code created by Giles. In that code, he examined the embedded color profile for the Device Model Desc attribute == IEC 61966-2.1 Default RGB colour space - sRGB. If an exact match is found, then the profile is replaced with TinyRGB. I propose instead two criteria must be met:
- Check the EXIF ColorSpace=sRGB or the tag is missing (which can be done with EXIFTOOL at the same time as getting any profile information).
- Check the profile Device Model Desc == IEC 61966-2.1 Default RGB colour space - sRGB or the profile is missing altogether
In the case of existing functionality, the additional check for the EXIF tag should be harmless as all valid JPGs will have that tag set to sRGB if they have gone to the trouble of embedding an sRGB profile.
Images that do not use sRGB but also fail to include an embedded profile (typically AdobeRGB color space) are also a problem, but far less common. There may be ways to identify and patch those up, but that could be a different lower-priority task.
This feature would only benefit thumbnailed images (which includes those displayed at fixed size on the image-description page). It doesn't alter the full-sized JPG. Another option would be to embed a profile at upload time when one is missing. It is the approach taken by many image hosting websites (Smugmug, Flickr) to ensure all their images look great. But it does change the file, which we might want to avoid, and it doesn't help with content already uploaded.
Btw, thumbnails a cached. How long is the cache held for and what would cause new thumbnails to be generated for existing images?
[Edit - added the following]
Steps to Reproduce:
- Get yourself a wide-gamut desktop monitor and configure both it and your operating system display profile to be AdobeRGB or native profile of the monitor. If you've done this correctly then go to this test page and section "How far from sRGB is your display color gamut?". You should see a different between the super-saturated ProPhotoRGB color swatches and the plain old sRGB color swatches. If you don't then you won't see the issue. You may also want to look at the "How does your browser interpret untagged images and page elements?" section to see how different the effect of including a profile can be.
- View an image on Commons that has no embedded profile via the thumbnailer. See My Browser Test Page and the section "Images without profiles". You can use Chrome, Firefox or Opera but do not use Internet Explorer or Edge since those are just broken wrt monitor color management.
The pencils on the left will appear more saturated than those in the section above. This is because they are being rendered with your wide-gamut monitor profile (AdobeRGB) when they are in fact just sRGB images.
The pencils on the left should appear identical to those in the section above (assuming the cached thumbnails are re-generated).