[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
Mon Jun 21 23:44:04 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:
--------------------------+---------------------
Changes (by azaozz):

 * keywords:   => needs-patch


Comment:

 Thinking perhaps would be good to have a `wp_image_webp_support()` or
 similarly named function to quickly/easily determine if WebP images can be
 processed by the server.

 Seems such function can use `WP_Image_Editor_GD::supports_mime_type(
 'image/webp' )` or `WP_Image_Editor_Imagick::supports_mime_type(
 'image/webp' )` although to access these functions the classes may need to
 be tweaked a bit.

 Alternatively can do directly `gd_into()` or `Imagick::queryFormats()`.

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


More information about the wp-trac mailing list