Returns the default compression quality setting for the mime type.
Parameters
$mime_type
stringrequired
Source
protected function get_default_quality( $mime_type ) {
switch ( $mime_type ) {
case 'image/webp':
$quality = 86;
break;
case 'image/jpeg':
case 'image/avif':
default:
$quality = $this->default_quality;
}
return $quality;
}
Changelog
Version | Description |
---|---|
5.8.1 | Introduced. |
User Contributed Notes
You must log in before being able to contribute a note or feedback.