• I’ve been recently having problems on multiple past client sites. The thumbnails that WP resizes are SUDDENLY grainy. They never were before, but they are now.

    They are on varying versions of WordPress, and are not using the same plugins. Some are fully up-to-date on everything, some are far behind (on WP, their themes, and plugins).

    And yes, this is on all of their sites: add_filter('jpeg_quality', function($arg){return 100;});

    I am completely stumped. Any ideas of what has happened?

Viewing 5 replies - 1 through 5 (of 5 total)
  • Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    Please provide a link to a page on your site where we can see this. Thanks.

    Moderator Samuel Wood (Otto)

    (@otto42)

    www.remarpro.com Admin

    The jpeg_quality filter doesn’t do what you think it does.

    Check out some of these visual examples to understand it better:

    https://regex.info/blog/lightroom-goodies/jpeg-quality

    Anything above the default of 82 is probably not visible to you. Really.

    Thread Starter christinaleans

    (@christinaleans)

    So the filter DOES NOT control how a jpeg is or isn’t compressed upon WordPress resizing it to the theme’s thumbnail sizes?

    Most of the sites that I’m having the issue on are photographers’ sites (those are the ones I have the filter on) because they are very particular about compression and have already done it themselves in the editing process.

    Regardless of that, the featured image quality on several sites are suddenly junk. I’ll check with them and see if they mind me sharing their links.

    Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    Link, please, Christin.

    Moderator Samuel Wood (Otto)

    (@otto42)

    www.remarpro.com Admin

    So the filter DOES NOT control how a jpeg is or isn’t compressed upon WordPress resizing it to the theme’s thumbnail sizes?

    It controls one factor of the jpeg compression process, yes, but setting it to 100 doesn’t make it “uncompressed”. JPEG is always compressed.

    Most of the sites that I’m having the issue on are photographers’ sites (those are the ones I have the filter on) because they are very particular about compression and have already done it themselves in the editing process.

    I understand. However, no amount of magic is going to give you the eyesight needed to spot the difference between, say, 90 and 100 on the jpeg_quality level. Artifacts at that level would only ever be visible to the naked eye in extremely rare edge cases. Setting it to 100 and having the filesize increase double or more isn’t really worth it.

    As for the images now being junk, nothing has changed with how WordPress makes thumbnails in several years. The code is the exact same.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Images lose quality after WP resize (even with the jpeg quality filter at 100)’ is closed to new replies.