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

WordPress Trac noreply at wordpress.org
Fri Feb 19 20:42:09 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:65 adamsilverstein]:
 > {{{
 > // Render WebP previews as PNG to workaround possible segfault issues.
 > if ( 'image/webp' === $mime_type ) {
 >               $extension = 'PNG';
 >               $mime_type = 'image/png';
 > }
 > }}}
 >
 >
 > Do you know if this is still required? Do you have any additional
 context?

 Most of the weird GD/Imagick workarounds in the earlier patches were added
 to account for bugs and shortcomings in some of the PHP 5.x modules, where
 WebP support was only partially or inconsistently implemented.

 Since WordPress now requires PHP 7+, that PNG stream workaround is
 probably not needed any longer.

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


More information about the wp-trac mailing list