1. Home
  2. Wordpress
  3. Set jpeg quality
#wordpress#php

This filter lets you change compression level when saving and uploading jpeg files. By default compression level is set to 90.

function change_jpeg_quality() {
    return 95; 
}
add_filter( 'jpeg_quality', 'change_jpeg_quality');
copy
Full Wordpress cheatsheet
Sitemap Git repository