Filters the default image compression quality setting.
Description
Applies only during initial editor instantiation, or when set_quality() is run manually without the $quality argument. The WP_Image_Editor::set_quality() method has priority over the filter.
Parameters
$qualityint
Quality level between 1 (low) and 100 (high).
$mime_typestring
Image mime type.
$sizearray
{ Dimensions of the image. @type int $width The image width. @type int $height The image height.}
263* Dimensions of the image.264*265* @type int$width The image width.266* @type int$height The image height.267*}268*/269$quality=apply_filters('wp_editor_set_quality',$default_quality,$mime_type,$dims?$dims:$this->size);270271if('image/jpeg'===$mime_type){272/**273* Filters the JPEG compression quality for backward-compatibility.274*275* Applies only during initial editor instantiation,or when set_quality() is run
History
Introduced in 3.5.0. One change between 6.7.7 and 7.1.0.