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-admin/includes/media.php

    r50810 r51227  
    21992199    }
    22002200
     2201    // Check if WebP images can be edited.
     2202    if ( ! wp_image_editor_supports( array( 'mime_type' => 'image/webp' ) ) ) {
     2203        $plupload_init['webp_upload_error'] = true;
     2204    }
     2205
    22012206    /**
    22022207     * Filters the default Plupload settings.
Note: See TracChangeset for help on using the changeset viewer.