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

WordPress Trac noreply at wordpress.org
Fri Nov 13 16:00:29 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 joemcgill):

 I would love to see this happen, but there are a few distinct challenges
 that we'd need to solve to move this forward.

 First, we need to be clear by what we meant when we say "add WebP
 support". Allowing people to upload WebP images to their media library is
 insufficient, in my opinion, as long as there are are a number of
 devices/browsers that still don't support rendering WebP images. As of
 today (Nov 13, 2020) WebP support is sitting at ~86% based on
 https://caniuse.com/webp. This has gotten much better, but not enough to
 add it as a default format yet.

 In order to truly support WebP images (and other next-generation formats,
 like AVIF) we need to be able to convert uploaded files to these alternate
 formats and create sub-sizes. We also will need to decide on a way of
 serving users the best available image format to people based on the
 capabilities of their browsers. There are a number of strategies we could
 pursue, including markup based solutions (i.e. <picture>) or server-side
 solutions that serves alternative file formats based on the accept header
 from a request. The latter is admittedly more difficult since WP currently
 serves files directly from the filesystem, rather than hitting any code
 where this logic could run before serving an image, so it may be a
 nonstarter to pursue something like this for core.

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


More information about the wp-trac mailing list