[wp-trac] [WordPress Trac] #53475: No error shown on uploading a WebP image when the server doesn't support editing it

WordPress Trac noreply at wordpress.org
Tue Jun 22 14:59:09 UTC 2021


#53475: No error shown on uploading a WebP image when the server doesn't support
editing it
--------------------------+---------------------
 Reporter:  azaozz        |       Owner:  (none)
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  5.8
Component:  Media         |     Version:  trunk
 Severity:  normal        |  Resolution:
 Keywords:  needs-patch   |     Focuses:
--------------------------+---------------------

Comment (by adamsilverstein):

 Interesting, I hadn't seen `wp_show_heic_upload_error`!

 I was thinking that if the server doesn't support WebP maybe we should
 block uploads, it is a soft error in that the upload will work and only
 the image resizing will fail, but this may mean a broken site for the user
 when they try to use the image, so perhaps preventing the upload in the
 first place is better?

 I prepared a patch that alters `get_allowed_mime_types`, excluding WebP
 when the server lacks support. This causes an error to display when you
 try to upload a WebP on such a system I also updated the error message
 slightly. Patch incoming.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/53475#comment:5>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list