Adjust WordPress JPEG Resize Quality

Got your latest images pixelated after uploading it to WordPress? Yes, that could be irritating especially on Photography sites.  WordPress has a function to adjust the level of the image quality, as described on Developer Code Reference.

Simply put this small code to your functions.php

function update_jpeg_quality( $quality, $context ) {
	return 100;
}
add_filter( 'jpeg_quality', 'update_jpeg_quality' );

Adjust return number to set the level of compression.

100 = No Compression applied. Change it moderate compression about 80. Anything below 80 will make your images looks pixelated but produced a minimum of file size.

snippet, Wordpress, ,

Any idea? Fill the comment below

This site uses Akismet to reduce spam. Learn how your comment data is processed.