You’ve might notice that for some of the pictures you upload to your WordPress website the quality is affected. They seem blurry and pixelated. Why does this happen and how can you fix it? See below the explanation and the solution to image quality loss.
Why WordPress uploaded images lose quality
This happens because, by default, WordPress reduces the quality of your images by 60% when processing. As some pictures are already preprocessed before you try to upload them, this compression might result in a visual quality loss. By using this method WordPress tries to improve your blog’s load time.
How to fix image quality loss
There are two quick-fix solutions for this.
a. Use a plugin to optimize your images
I recommend you to use WP Smush.it. It is easy to use (self-explanatory menu and options) and allows you to optimize the whole images on your website. Install it as any other WordPress plugin, activate it and explore its features. If you have troubles configuring it let me know in a comment and I will try to help you.
b. Add a function in function.php file
This solution is recommended if you have some WordPress developer experience. All you need to do is to add the below code in the function.php file of your theme:
add_filter( 'jpeg_quality', create_function( '', 'return 60;' ) );
The 60 in the above line represents the compression rate WordPress applies. You can modify it as you see fit. If you set it to 100 that you must make sure your pictures are perfectly optimized for the web in order not to impact the load times of your page. As a result, the function will not affect the images you already have uploaded, only the new ones.
Tip: boost your website with these awesome plugins for WordPress.