Make WordPress Core

Ticket #53917: 53917.diff

File 53917.diff, 646 bytes (added by adamsilverstein, 2 years ago)

refresh patch against trunk

  • src/js/media/controllers/library.js

    diff --git src/js/media/controllers/library.js src/js/media/controllers/library.js
    index ace0028644..2acc89a586 100644
    Library = wp.media.controller.State.extend(/** @lends wp.media.controller.Librar 
    196196        isImageAttachment: function( attachment ) {
    197197                // If uploading, we know the filename but not the mime type.
    198198                if ( attachment.get('uploading') ) {
    199                         return /\.(jpe?g|png|gif)$/i.test( attachment.get('filename') );
     199                        return /\.(jpe?g|png|gif|webp)$/i.test( attachment.get('filename') );
    200200                }
    201201
    202202                return attachment.get('type') === 'image';