askdesign
1/4/2016 - 9:39 PM

How to Change JPEG Compression in WordPress

Functions file

/*** If you want WordPress to stop automatically compressing image, you need to tell it to load these files at 100% quality.
add_filter( 'jpeg_quality', create_function( '', 'return 100;' ) );

/*** WP automatically compresses at 90% quality
add_filter( 'jpeg_quality', create_function( '', 'return 90;' ) );

/*** This code words also
add_filter(‘jpeg_quality’, function($arg){return 100;});