[wp-trac] [WordPress Trac] #35725: Add WebP support.

WordPress Trac noreply at wordpress.org
Fri Mar 19 04:27:30 UTC 2021


#35725: Add WebP support.
-------------------------------------------------+-------------------------
 Reporter:  markoheijnen                         |       Owner:
                                                 |  adamsilverstein
     Type:  enhancement                          |      Status:  assigned
 Priority:  normal                               |   Milestone:  5.8
Component:  Media                                |     Version:  3.5
 Severity:  normal                               |  Resolution:
 Keywords:  has-patch needs-testing has-unit-    |     Focuses:
  tests needs-dev-note dev-feedback              |
-------------------------------------------------+-------------------------

Comment (by blobfolio):

 Replying to [comment:114 atjn]:
 > Great point, although this seems like a very specific issue. Wouldn't a
 filter to disable WebP be good enough for this? Or everything could just
 be a try:catch block and then load the shim if the code fails.

 As I see it, this ticket is currently covering at least three distinct
 features, any combination of which might be good or bad for a given site:
  1. WebP support in the Media Library (allow uploads of WebP files and
 generate thumbnails for them);
  2. Convert JPEG/PNG/GIF images into WebP instead of or in addition to
 preserving their original format;
  3. Test/polyfill WebP support in users' browsers;

 The first and third parts are presumably already covered by existing
 hooks, like `upload_mimes`, but it would be beneficial to be able to
 disable `#2` explicitly and separately from the rest.

 For example, I've tried auto-converting images to WebP and other formats
 for hosted clients in the past, but I received enough complaints from
 people who noticed the 5% of cases where such images wound up worse
 (rather than being overjoyed by the 95% of cases where images wound up as
 good or better...) to make it not worth it.

 But once these features roll out, particularly if they're enabled by
 default even on existing installs, it will only be a matter of time before
 clients start uploading WebP source images without realizing it, and it
 would be very handy to have `#3` as a fallback to ensure their visitors
 are actually able to load those images.

 People... Haha.

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


More information about the wp-trac mailing list