WordPress will compress the image for better performance by default. Some users wonder that is it possible to change those settings according to our needs. This article will show increase or decrease the JPEG .

Every time JPEG file is uploaded it would automatically compress the image to 90% quality which is further decreased to 82% to improve performance from mobile users.

If you want to show high quality images on your website you can turn off image compression in WordPress.

How to Disable Image Compression in WordPress

All you need to do is paste the following code in your theme’s functions.php file or in a site-specific plugin.

1add_filter(‘jpeg_quality’, function($arg){return 100;});


When the value is set to 100 it means that WordPress will compress the image to its highest quality.

If you don’t have any know how about images then you probably won’t see any difference but professionals will see that the difference is obvious.

How to Increase Image compression in WordPress

There are many performance benefits to leaving the compression quality as it is.  If you want, you can change the number from 100 to 80 or something lower to squeeze a few more kBs, then all you have to do is paste the following code:

1add_filter(‘jpeg_quality’, function($arg){return 75;});


When you do make these image quality changes, you want to make sure that you regenerate your thumbnails.

Tags : image compressionwordpressWordPress how to
Nooruddin Ahmed

The author Nooruddin Ahmed

An avid football fan. Lives for the weekend game.Aviation enthusiast. Believes in letting bygones be bygones.

Leave a Response