JPEG image quality set to 10 (low quality) and don't know why
-
Here’s a strange one: I’m running two IDENTICAL versions of the same MS install on the SAME box. Databases are different (but recently cloned), theme code, plugins and plugin code, wp_options are all identical.
Yet, on one, if I upload a JPEG image via the Media Library, its quality is horrible. WP_Image_Editor->get_quality() reports it as $quality == 10. On the other version (the dev site, sigh) the quality is just fine.
Here’s where it gets weird. I have registered the jpeg_quality filter to set a bogus wp_options record just to let me know what the quality is. On the live site the jpeg_quality and wp_editor_set_quality filters NEVER FIRE (eg, on image upload). On the dev site, they fire and report “90” as the quality. But on the live site the filters aren’t even invoked.
So that means that the WP_Image_Editor isn’t even being utilized.
I __suspect__ I’m getting the deprecated message when I turn WP_DEBUG on, but of course, since all this is happening in an Ajax call, I’m not seeing the message, just an “Error” dialog box in the Admin when WP_DEBUG is enabled. Sure would love to know what the WP_Error actually is…
So I’ve added an init function that just instantiates the editor using wp_get_image_editor() just to read out what library it’s using and it’s an instance of WP_Image_Editor_GD, the GD is present and working.
I’ve grepped the entire site’s codebase for occurrences of “jpeg_quality” to see whether some theme, plugin or other code is calling that filter and I’m not finding anything.
I have no idea what’s going on. I strongly suspect W3TC has something to do with that, but I can’t back that claim up, and I have the plugin on both sites and it’s configured the same way.
- The topic ‘JPEG image quality set to 10 (low quality) and don't know why’ is closed to new replies.