Media Gallery Upload Thumbnail Compression is Changing Image Hue

When I upload an image to my media gallery, all the image sizes that are generated are discolored. Here’s an example.

This is the full-size image:
Fulll size with correct colors

And now here is one of the smaller image sizes:
enter image description here

See the difference? The blue picture on the wall is now teal green, and the whole image has a blueish hue to it. I’ve tried the following things. None of these worked:

  1. Regenerate Thumbnails Plugin (Overwriting them)
  2. Deleting all generated images then running Regenerate Thumbnails (This creates fresh thumbnail files)
  3. Uploading a brand new photo and attaching it to a post.
  4. Adding the WP filter that forces full quality compression.

add_filter('jpeg_quality', function($arg){return 100;});

However, when I upload just a random JPG from the internet, the thumbnails made from that image are fine! What could be going on with this specific set of jpgs that messes up the compression?

1 Answer
1

That is a huge difference!

I think this is your issue…

Any time an image is uploaded, if that image was saved in the Adobe RGB color space, then the image does not get loaded correctly for resizing. Thumbnails are saved in the default color space, which is sRGB. By failing to perform the color conversion, and then failing to specify the non-default color space in EXIF, thumbnails are produced with colors that are noticeably different from the original.

Try converting your images to use sRGB, re-saving and re-uploading them.

Reference – https://graphpaperpress.com/tips/fix-image-color-saturation-loss-in-wordpress/

Leave a Comment