0%
Posted inUncategorized

Force High-Quality WordPress Images

WordPress uses a default quality of 90%. This is fine in most cases; I doubt many people can see the difference. But if top-notch image quality is a must on your website (for a portfolio, photography, etc.), modifying the value might be best.

WordPress images by default output images at 90% of its resolution quality. Typically the default WordPress settings are more than enough; majority of users aren’t going to be able to see the difference. Regardless, if an extremely high-quality image is a must-have for your website (for a portfolio, photography, etc.), enhancing the value too 100% is probably best.

add_filter( 'jpeg_quality', 'high_res_image' );
function high_res_image() {
   return 100;
}

Simply add this code to your functions.php file.


Leave a Reply