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

WordPress Trac noreply at wordpress.org
Thu Mar 18 18:53:37 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 atjn):

 Replying to [comment:112 blobfolio]:
 > Don't forget that iOS doesn't actually support rendering engines other
 than Safari's. Everyone with an old iPhone will be stuck without WebP
 support until they buy a new device regardless of the "browser" they use.

 I did account for this in
 [https://core.trac.wordpress.org/ticket/35725#comment:100 comment 100].
 "Safari" covers all browsers installed on iOS (and Safari on MacOS). The
 latest iPhone that can't update is about 5 years old, and the vast
 majority of users have upgraded since then. That is why it almost isn't
 represented in the usage stats anymore.

 > Global usage stats are a good place to start, but don't really mean much
 when it comes to predicting the kinds of traffic any individual site might
 receive. There are still entire industries (insurance, government, non-
 profit, medical, etc.) requiring Internet Explorer compatibility.

 True, I think a good shim will solve that issue.

 > Testing for WebP compatibility (a la Modernizr) requires the ability to
 inject a data-uri image into the DOM. Sites with CSP restrictions
 prohibiting script-generated data: sources won't be able to execute the
 tests.

 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.

 > Using `<picture>` is a lot more performant than any runtime-based
 decoding fallback, but would require sites still generate thumbs in the
 original format (and WebP thumbs secondarily).

 Yeah, that probably wouldn't work. You also had a few other great reasons
 in [https://core.trac.wordpress.org/ticket/35725#comment:43 comment 43].

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


More information about the wp-trac mailing list