WordPress.org

Make WordPress Core

Opened 3 months ago

Last modified 3 months ago

#47840 new enhancement

Weird colors when users upload CMYK JPG images

Reported by: lexo_ch Owned by:
Milestone: Awaiting Review Priority: normal
Severity: minor Version: 5.2.2
Component: Media Keywords: needs-patch
Focuses: ui Cc:
PR Number:

Description (last modified by SergeyBiryukov)

When a user uploads an image which uses the CMYK color spectrum and WordPress applies its magic to the image the colors become very much mixed up.

It would be nice if WordPress would recognize the image format and perhaps convert the CMYK image to an RGB before applying the image optimizations.

How to reproduce the problem?

  1. Go to Gallery (media)
  2. Upload a JPG image which uses the CMYK color spectrum
  3. Watch how e.g. the color green becomes yellow ;)

Attachments (1)

Test CMYK image.jpg (1.5 MB) - added by lexo_ch 3 months ago.
Test CMYK file

Download all attachments as: .zip

Change History (4)

#1 @SergeyBiryukov
3 months ago

  • Component changed from Gallery to Media
  • Description modified (diff)

#2 @Otto42
3 months ago

WordPress doesn't actually have any code to do images on that level, it uses the available libraries already installed on the host, like GD or ImageMagick, to do that grunt work.

So, if something is wrong there, then you need to identify specifically which versions of which libraries are causing the issue. Workarounds might be found, but you'd need to identify them and provide example images that can reproduce the problem.

@lexo_ch
3 months ago

Test CMYK file

#3 @lexo_ch
3 months ago

I uploaded the test image file to multiple wordpress instances on different servers / providers - it always bugs out. Sometimes the guys' shirt is yellow, sometimes the image becomes extremely dark.

Note: See TracTickets for help on using tickets.