diff --git src/wp-includes/class-wp-image-editor-imagick.php src/wp-includes/class-wp-image-editor-imagick.php
index d38ee6fd63..1a91fce712 100644
|
|
class WP_Image_Editor_Imagick extends WP_Image_Editor { |
206 | 206 | switch ( $this->mime_type ) { |
207 | 207 | case 'image/jpeg': |
208 | 208 | $this->image->setImageCompressionQuality( $quality ); |
| 209 | $this->image->setCompressionQuality( $quality ); |
209 | 210 | $this->image->setImageCompression( imagick::COMPRESSION_JPEG ); |
210 | 211 | break; |
211 | 212 | case 'image/webp': |
… |
… |
class WP_Image_Editor_Imagick extends WP_Image_Editor { |
214 | 215 | if ( 'lossless' === $webp_info['type'] ) { |
215 | 216 | // Use WebP lossless settings. |
216 | 217 | $this->image->setImageCompressionQuality( 100 ); |
| 218 | $this->image->setCompressionQuality( 100 ); |
217 | 219 | $this->image->setOption( 'webp:lossless', 'true' ); |
218 | 220 | } else { |
219 | 221 | $this->image->setImageCompressionQuality( $quality ); |
| 222 | $this->image->setCompressionQuality( $quality ); |
220 | 223 | } |
221 | 224 | break; |
222 | | case 'image/avif': |
223 | 225 | default: |
224 | 226 | $this->image->setImageCompressionQuality( $quality ); |
| 227 | $this->image->setCompressionQuality( $quality ); |
225 | 228 | } |
226 | 229 | } catch ( Exception $e ) { |
227 | 230 | return new WP_Error( 'image_quality_error', $e->getMessage() ); |