Why do I have blury images in WordPress

It seems WordPress is doing an exceptionally bad job when it comes to re-sizing my images.

In the media options I have set my image sizes to my liking. Most notably 857px wide for the medium thumbs, and set the quality to 100, as well as turned on sharpening.

I have set the following in the functions.php

add_filter( 'jpeg_quality', create_function( '', 'return 100;' ) );

Sadly this has little to no affect at all on the quality of the images produced in WordPress.

wordpress resized
original exported in lightroom to same resolution

At first the difference might not appear to be that distinct, but look at the rock? It’s probably more apparent on photos with more detail, but it can still be seen here.

Solutions Collecting From Web of "Why do I have blury images in WordPress"

The filter you are using only stops jpeg compression. This does not prevent quality loss when resizing an image. Manually you would apply a sharpen filter afterwards to regain some crispyness in the image. WordPress doesn’t do that.

However, WP does have the WP_Image_Editor class for image manipulation. It has some built-in methods, such as resize and rotate, but no sharpen. However, the class also gives a gateway to PHP’s ImageMagick library, which allows you to sharpen images.

To cut a long story short, someone has already done this for you and made it into a plugin.