Skip to content

Commit

Permalink
Update plugins/webp-uploads/helper.php
Browse files Browse the repository at this point in the history
Co-authored-by: Weston Ruter <westonruter@google.com>
  • Loading branch information
adamsilverstein and westonruter committed May 8, 2024
1 parent cf64392 commit af02272
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion plugins/webp-uploads/helper.php
Original file line number Diff line number Diff line change
Expand Up @@ -373,7 +373,7 @@ function webp_uploads_mime_type_supported( string $mime_type ): bool {
// In certain server environments Image editors can report a false positive for AVIF support.
if ( 'image/avif' === $mime_type ) {
$editor = _wp_image_editor_choose( array( 'mime_type' => 'image/avif' ) );
if ( 'WP_Image_Editor_GD' === $editor ) {
if ( is_a( $editor, WP_Image_Editor_GD::class, true ) ) {
return function_exists( 'imageavif' );
}
if ( 'WP_Image_Editor_Imagick' === $editor ) {
Expand Down

0 comments on commit af02272

Please sign in to comment.