diff options
Diffstat (limited to 'wp-includes/js/plupload/wp-plupload.js')
-rw-r--r-- | wp-includes/js/plupload/wp-plupload.js | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/wp-includes/js/plupload/wp-plupload.js b/wp-includes/js/plupload/wp-plupload.js index 0fdebf7..c0eb570 100644 --- a/wp-includes/js/plupload/wp-plupload.js +++ b/wp-includes/js/plupload/wp-plupload.js @@ -363,6 +363,11 @@ window.wp = window.wp || {}; error( pluploadL10n.noneditable_image, {}, file, 'no-retry' ); up.removeFile( file ); return; + } else if ( file.type === 'image/avif' && up.settings.avif_upload_error ) { + // Disallow uploading of AVIF images if the server cannot edit them. + error( pluploadL10n.noneditable_image, {}, file, 'no-retry' ); + up.removeFile( file ); + return; } // Generate attributes for a new `Attachment` model. |