Have you noticed the blurred appearance of the images you have uploaded to your WordPress website? When you upload images to the media library, WordPress automatically compresses them for better performance. If you are a webmaster who wants to display high-quality images on your website, you can disable image compression in WordPress.
You can disable image compression in WordPress by adding the below code to your theme's functions.php file:
function themesdna_disable_image_compression() {
add_filter('jpeg_quality', function($arg){return 100;});
add_filter('wp_editor_set_quality', function($arg){return 100;});
}
add_action('init', 'themesdna_disable_image_compression');
The above code will turn off JPEG compression on your website. 100 indicates that there is no compression. The lower the number, the greater the compression.
Note: Images you have already uploaded will not be impacted by this modification.