Make WordPress Core


Ignore:
Timestamp:
06/24/2021 07:10:32 PM (3 years ago)
Author:
azaozz
Message:

Media: Prevent uploading and show an error message when the server doesn't support editing of WebP images, take II. Add new, better error message for it.

Props antpb, joedolson, iandunn, azaozz.
Fixes #53475.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/media.php

    r51221 r51227  
    38593859    }
    38603860
     3861    // Check if WebP images can be edited.
     3862    if ( ! wp_image_editor_supports( array( 'mime_type' => 'image/webp' ) ) ) {
     3863        $defaults['webp_upload_error'] = true;
     3864    }
     3865
    38613866    /**
    38623867     * Filters the Plupload default settings.
Note: See TracChangeset for help on using the changeset viewer.