1. Home
  2. Wordpress
  3. Set jpeg quality

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

#wordpress#php
function change_jpeg_quality() {
    return 95; 
}
add_filter( 'jpeg_quality', 'change_jpeg_quality');
copy
Full Wordpress cheatsheet