WP Smush Pro changed the color of the images

We setup smush on a client website, and it changed the color of the images. I don't think i've seen that happen before.

  • Adam Czajczyk

    Hello Jeremy,

    I hope you're well today and thank you for your question!

    I have checked your site and the images doesn't seem "washed out of colors" any more there so I assume you have regenerated them, right?

    When I was checking images provided as examples I was also able to confirm what my colleague Abdul found out during your chat - that even saving those images from browser (so no Smush involved in a process) reduces the colors. I tried with both Chrome and Firefox and the same happened. That's indeed a strange issue and I've never seen that before. What I see in a browser should, at least in theory, be saved the same way to the file.

    Taking that into account, I think it's not a WP Smush Pro issue itself. I just open one of the images from you Media Gallery (looked fine when viewed in browser) and saved it (knowing that WP Smush is not even enabled now on site) and the same happened.

    I checked other plugins but it doesn't seem like they are interfering. I have noticed one other image optimization plugin on your site but it's disabled. I don't know how exactly it works but were the images processed by it before running Smush by any chance? It's not that I'm "blaming" it, I'm just trying to find some possible foothold here, any king of it.

    I tried to research the issue but, to be honest, I didn't found much information on this. The closest probable explanation would be related to the colors space/pallette settings. I assume that these images where actually manipulated in some photo editing app before being uploaded so that could be possible that some non-standard/too complex options were used for this.

    In fact, I tried one other test on them: I have saved the original image again (and again, it was showing fine in browser) and then tried to open that saved image in different ways right from my local drive:

    - in Firefox and Chrome - that saved image showed up fine
    - in IrfanView (an image viewer that I use on PC/Win10 adn usually handles images well) - colors are washed out
    - in Paint (windows default) - washed out
    - in Paint 3D (windows included) - washed out
    - in Windows Image Viewer (windows included) - displays fine, full color as original
    - in "Photos" (app included in Windows 10) - displays fine, full color as original

    Sorry for a poor choice of apps used but I'm not a designer/photographer and I don't work with that kind of content so I don't have access to anything like Photoshop etc. Still tho, that shows that the very same file is displayed differently depending on the app used to open it.

    That seems to confirm the issue of some very specific colors space/pallette used when creating these images. That also gets me back to Smush. With "super smush" disabled, the plugin doesn't remove any meaningful information from the file, in that sense that it's impossible for it to change any data that affect image quality.

    However, if I open the image e.g. with aforementioned IrfanView (that shows it "washed out") that doesn't seem to handle palette used and re-save it, that copy will be really "washed out" now. I think the same happens here - WP Smush, which sends images to our cloud image optimization app, doesn't actually process those images on a "bit level", using fully native code. Instead, like pretty much all optimization plugins, in some parts it uses underlying "system libraries" (I'm sorry but I don't know the exact details) in a same manner like e.g. PHP uses gd or imagick library. Those tools might not be able to handle that in that same way.

    That being said, I admit I'm not sure if there is anything that could be done here apart from actually converting images with something like PhotoShop to use some standard, web-compliant RGB colors space, then re-uploading them to site and smushing (without using super-smush) again.

    However, I have asked our developers about this to see if they could confirm my thinking or if they are able to find out some other explanation for this and if we are able to make Smush handle such cases.

    Please keep an eye on this thread for further information (note please that it might take a bit more time as our developers are dealing with a lots of complex issues on daily basis).

    Best regards,
    Adam

  • Adam Czajczyk

    Hello again Jeremy,

    I just had a talk with a lead developer of WP Smush and it seems that I was on a right track, sort of, but not exactly. It turns out that it's related to the JPG format used. I don't know the details but the images are using some kind of an old implementation of the format which actually requires EXIF data to be kept to keep the proper color palette.

    That being said, I have run some tests of that on my site (using your images) and can confirm the solution:

    1. Make sure that the option to preserve EXIF data is enabled in WP Smush settings
    2. Keep the option to resize original images disabled (as resizing will unfortunately break that too).

    This should solve the problem. As long as these two options are set that way, "super-smush" option, if enabled, doesn't seem to "break" images so that's a good news :slight_smile:

    I would, howver, suggest giving it a try (just to make sure) with "Automatic smushing on upload" disabled and on just single images (before running bulk smush) to confirm that it works for you as well. It would also be safer to make sure that keep my original images option is enabled so you could restore if necessary.

    Best regards,
    Adam

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.