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

WordPress Trac noreply at wordpress.org
Mon Mar 29 18:32:49 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):

 @mikeschroder

 > Patch refresh after [50586] and addition of WebP resize automated test.
 (not passing yet)

 Excellent, thanks for the refreshed patch.

 > it's possible it's just that there weren't any changes necessary for the
 Imagick editor to support it.

 I finally got around to testing this locally and as you suspected, no
 other changes are required for Imagick to work correctly. In particular,
 `WP_Image_Editor_Imagick::supports_mime_type` works as expected when
 passed 'image/webp' and `_save` also works as expected.

 I tested by enabling only WP_Image_Editor_Imagick for `wp_image_editors`
 then uploaded a large WebP image. The image sub-sizes were generated and
 the source code correctly contained the srcset referencing the various
 image sizes (as WebPs).

 I also did some testing using an older PHP with GD lacking WebP support.
 In this case I was still able to upload WebP images, while sub-size
 resizing failed. In source view, only the uploaded image was referenced.

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


More information about the wp-trac mailing list