WordPress Media Library JPEG Compression

Add the following code in the functions.php to control the JPEG compression level in the WordPress media library:

<?php

add_filter(
	'jpeg_quality',
	'adjust_jpeg_quality'
);

function adjust_jpeg_quality($quality) {
	return 100; /* 0 = strong compression / 100 = no compression */
}

This setting do not impact the Optimus plugin or the way how Optimus compress your images. Optimus always uses smart compression to optimize JPEG images using slight lossy compression and PNG images using lossless compression. Changing the JPEG quality in WordPress is ideal if you still wish to have a lossy compression to further reduce your thumbnail image size below a 85% quality. The lower the quality factor is, the lower the quality of your JPEGs will be. Read more about Optimize JPEG quality in WordPress.