[wp-trac] [WordPress Trac] #35725: Add mime-type for Webp

WordPress Trac noreply at wordpress.org
Wed Mar 10 20:45:47 UTC 2021


#35725: Add mime-type for Webp
-------------------------------------------------+-------------------------
 Reporter:  markoheijnen                         |       Owner:
                                                 |  adamsilverstein
     Type:  enhancement                          |      Status:  assigned
 Priority:  normal                               |   Milestone:  Future
                                                 |  Release
Component:  Media                                |     Version:  3.5
 Severity:  normal                               |  Resolution:
 Keywords:  has-patch 2nd-opinion needs-testing  |     Focuses:
  has-unit-tests                                 |
-------------------------------------------------+-------------------------

Comment (by blobfolio):

 Replying to [comment:69 adamsilverstein]:
 > I wonder if we can update `wp_getimagesize` instead of adding the
 `wp_get_image_size` function.

 With the new debug mode condition, I think all you really need to do is
 strip all the `@` out of your rewrite of my sizing method, give it a more
 appropriate name (like `wp_getimagesize_debug`), and update
 `wp_getimagesize` to call either `wp_getimagesize_debug` or
 `@wp_getimagesize_debug` instead of `getimagesize`/`@getimagesize` as it
 does now.

 (You could do it all inline, but that would require duplicating a lot of
 code.)

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


More information about the wp-trac mailing list