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

WordPress Trac noreply at wordpress.org
Thu Mar 18 15:14:34 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 adamsilverstein):

 > All I am saying is, I did not expect a file to be converted from one
 type to another when I started reviewing this ticket. Allowing WordPress
 to upload WEBP ( and it generate correct metadata / sub sizes ) is one
 task, and changing all sub-sizes to webp is another. Personally, I think
 these two tickets.

 @spacedmonkey very true, adding mime type support for WebP is a much
 smaller change that using WebP as the default format for downsampled
 images. As I have continued to work on this issue I have become a huge fan
 of the later - it will have a much bigger impact for the web and for site
 owners, who will benefit from faster site performance with no change
 required on their part.

 That said, the changes that remap images from one format to another are
 all isolated within the save functionality (plus test changes) and could
 be split off if we don't feel we are ready for the bigger change.

 > For what is worth, I am all for using webp for sub sizes, but I am just
 worried that change this bahaviour could be considered as a breaking
 changing. If we change this bahaviour and be bold, I would strongly
 recommand some easy way of changing it back to the old ( current )
 bahaviour. Maybe a filter.

 Great! What is breaking? From a user perspective everything works as it
 did before, no changes or broken features.

 Right, removing the behavior is as simple as `add_filter(
 'image_editor_mime_mapping', '__return_false' );` (we can make a mini
 plugin) and regenerating images should undo any already generated WebPs;
 we should validate that is true.

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


More information about the wp-trac mailing list