mirror of
git://develop.git.wordpress.org/
synced 2025-04-30 08:58:29 +02:00
Media: Remove an extra variable and a redundant check in WP_Image_Editor_Imagick::set_quality()
.
`wp_get_webp_info()` returns either a string or `false` for the `type` key, so we can just check for the string directly. Follow-up to [50810], [50814], [50815], [50818-50820]. See #35725. git-svn-id: https://develop.svn.wordpress.org/trunk@50821 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
08b4cab653
commit
630399eb20
@ -204,9 +204,8 @@ class WP_Image_Editor_Imagick extends WP_Image_Editor {
|
||||
break;
|
||||
case 'image/webp':
|
||||
$webp_info = wp_get_webp_info( $this->file );
|
||||
$type = $webp_info['type'];
|
||||
|
||||
if ( $type && 'lossy' === $type ) {
|
||||
if ( 'lossy' === $webp_info['type'] ) {
|
||||
$this->image->setImageCompressionQuality( $quality );
|
||||
} else {
|
||||
// Use WebP lossless settings.
|
||||
|
Loading…
x
Reference in New Issue
Block a user