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;});