[embedyt] http://www.youtube.com/watch?v=bv4kB-t57WE[/embedyt]
A few days ago, I was updating this post on my favorite m43 lenses, and I noticed the images were coming out soft. I immediately knew it was WordPress compression, because I’ve been through this with my own website years back (JaySoriano.com). But it looked even worse.
Since WordPress 4.5, their JPEG compression is actually even more aggressive at 82% of the image quality. Sure, a page my load faster for a mobile user, but it comes at the expense of people who want to show their images at their best… I mean what’s the point of spending thousands on gear only to upload low quality images to the web? I’m all for a faster web though, as a matter of fact Google just announced a new compression tool that reduced bandwidth by 75%.
Nonetheless, WPBeginner has a tutorial on how to disable JPEG compression with a single line:
add_filter('jpeg_quality', function($arg){return 100;});
Just place that at the end of your theme’s functions.php file. If that doesn’t work for your theme, or just don’t want to mess with that, here’s a plugin that does the exact same thing.
Some have speculated that it doesn’t effect quality when displayed at full resolution, I’d have to disagree. If you’re not going to re-upload every single image, be sure to at least run the Regenerate Thumbnails plugin, and it will regenerate thumbnails for your previously uploaded images.
The following images are a before and after of this process, it’s best viewed on a computer, because if you’re viewing it on mobile WordPress is going to resize it regardless and their will be less of a difference.