• There is a filter allowing to set/overwrite the JPEG quality for WP thumbnails (https://developer.www.ads-software.com/reference/hooks/jpeg_quality/).

    I don’t find a similar function for WebP images. Or does the JPEG one apply to WebP too ?

    The issue I have is the downsized thumbnails from certain original WebP images show posterization rings in smooth gradients, so I need to increase the quality. Right now, JPEG quality is set to 90 which, in WebP should be enough-ish, except it’s not.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Moderator t-p

    (@t-p)

    Review and see if this tutorial points in the right direction https://www.wpbeginner.com/wp-tutorials/how-to-use-webp-images-in-wordpress/

    Thread Starter aurelienpierre

    (@aurelienpierre)

    I have been an user of 3 of the described plugins in the past, and I’m specifically trying to fly away from all this bloatware madness. I’m looking for a couple of lines of PHP to save me from dozens of useless options and weird bugs by unplanned interactions.

    Moderator bcworkz

    (@bcworkz)

    “jpeg_quality” only applies to JPEG MIME types. There is a generic “wp_editor_set_quality” filter for setting the default quality. There is a $mime_type parameter passed so you can alter the default for specific MIME types. Webp images should be “image/webp” (unverified for this hook). The overall default is supposed to be 90.

    Any calls for scaling that specify a specific quality will override this filter, the filter merely sets the default value. Your gradient issues may have more to do with the editor engine than the quality setting. Image compression of gradients is difficult under any circumstance. While impractical for lots of images, in the past I’ve had to manually downsize problematic images with Photoshop or similar and replaced the ones that WP generates via FTP.

    Moderator bcworkz

    (@bcworkz)

    For some reason this topic appears to be a spam magnet, it is being closed to new replies.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Thumbnail quality for WebP images’ is closed to new replies.