How to change image quality in WordPress

The wp_editor_set_quality filter allows you to change the image quality based on the corresponding mime type. function stackinstall_filter_wp_editor_set_quality( $quality, $mime_type ) { if ( $mime_type === ‘image/jpeg’ ) { $quality = 80; } elseif ( $mime_type === ‘image/png’ ) { } elseif ( $mime_type === ‘image/gif’ ) { } return $quality; } add_filter( ‘wp_editor_set_quality’, ‘stackinstall_filter_wp_editor_set_quality’,… Continue reading How to change image quality in WordPress