Unable to Disable Image Compression
-
Hi,
I know this topic has been covered many times before but after reading several threads on the forums and multiple blog posts offering solutions, I’m still unable to stop WordPress from performing lossy compression when resizing images.
I’m building a photography website so it’s important that I’m able to control the quality of my images. I apply compression during export from Photoshop so don’t need or want to apply more lossy compression when importing to WordPress because doing so results in obvious artifacts and loss of sharpness.
I’ve been uploading images double the size of their containers for retina displays so relying on WordPress to resize the 2x images to half that size to fit the containers. The resulting images are quite soft as you can see in the image at the bottom of the page (the second image):
https://naturephotoist.com/image-compression-tests/
I’m not using any caching plugins (that I’m aware of).
To disable the native compression, I’ve tried adding several variations of the following “add_filter” code to the php file using the Code Snippets plugin. No luck there.
add_filter(‘jpeg_quality’, function($arg){return 100;});
I’ve also tried using the Image Quality plugin to change compression quality to 100 in Media Settings. That didn’t change anything. (By the way, it’d be great if WordPress made that an option natively, considering how many people are struggling with this!)
I’ve even read that installing Optimole just to turn off the WordPress native compression is a possible solution. That also didn’t work.
The only workaround I see now is to upload separate images for retina displays and normal resolution displays (images at half that size).
Hopefully instead of doing that, someone can point out a workable solution with a snippet of code or a plugin that will work.
Thanks in advance for any suggestions!
The page I need help with: [log in to see the link]
- The topic ‘Unable to Disable Image Compression’ is closed to new replies.