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

WordPress Trac noreply at wordpress.org
Fri Nov 13 19:19:17 UTC 2020


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

Comment (by blobfolio):

 Replying to [comment:42 svenwordpress]:
 > Also 100% with you, there is no reason  it can't be implementd and
 shipped immediately. We don't need a triage.

 I mean, there are a quarter of a billion reasons not to alter the HTML
 structure generated by existing WordPress image functions. Themes styling
 images based on e.g. `p > img` will break if images are suddenly shoved
 into `<picture>` elements. There will also be untold consequences for all
 the sites using plugins or custom workarounds to produce their own
 `<picture>`-type solutions currently. (Lots of tools, and even the Core
 itself, rely on dirty regex parsing, for example.)

 Performance-wise, many servers already struggle to generate all the
 different JPG and PNG thumbnails needed for display. Auto-generating WebP
 conversions would double that burden on upload, and require a runtime
 performance hit to check for `file_exists()` on older media to either
 create the missing WebPs or avoid suggesting dead links. (Retroactive
 generation would be a disaster even on speedy servers; a typical archive
 page calls a dozen or more images, and when you factor in the srcset
 variants, that could easily reach triple digits.)

 But that said, there's no reason WordPress can't support the WebP format
 in its own right, the same way it supports JPG and PNG formats. I did all
 the hard work for that years ago. Someone just needs to go through those
 patches to update them for a Gutenberg world. ;)

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


More information about the wp-trac mailing list