Prevent automatic image compression

By default, WordPress compress jpg images when you upload them to your blog. This is useful because it saves bandwidth and loading time, but sometimes you may prefer to have full quality images (For example, if you’re a photographer using WordPress to showcase your work).

Paste the code below into your functions.php file to remove automatic compression of images.

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