Select Page

WordPress compresses all images uploaded by default to save space and to keep your website’s size smaller. This keeps your website fast. If you want to preserve the quality of the JPEG/JPG images you upload, you can disable the compression for them using this simple code:

add_filter('jpeg_quality', function($arg){return 100;});

Add this code to your theme’s functions.php file. This code simply tells WordPress to keep the quality of uploaded JPEG images to 100%.