[wp-trac] [WordPress Trac] #52867: Use WebP as default format for image sub-sizes (when available).

WordPress Trac noreply at wordpress.org
Sat Mar 20 11:07:42 UTC 2021


#52867: Use WebP as default format for image sub-sizes (when available).
--------------------------------------+-----------------------------
 Reporter:  adamsilverstein           |       Owner:  (none)
     Type:  enhancement               |      Status:  new
 Priority:  normal                    |   Milestone:  Future Release
Component:  Media                     |     Version:
 Severity:  normal                    |  Resolution:
 Keywords:  has-patch has-unit-tests  |     Focuses:
--------------------------------------+-----------------------------
Description changed by SergeyBiryukov:

Old description:

> Follow up to https://core.trac.wordpress.org/ticket/35725 where we
> introduced support for WebP images. Please review this ticket first as
> many of the changes proposed here have already been discussed extensively
> there!
>
> By switching to WebP, users won't need to do anything and will benefit
> from faster sites because images will be 25-40% smaller, all with no loss
> of quality. Hosts will benefit from reduced memory usage for compression,
> and reduced storage and bandwidth requirements for images.
>
> By using WebP as the default image format:
>
> * Uploaded images are converted to smaller sub-sizes - these images will
> now use the WebP format if the server supports it.
>   * Note both GD and Imagick support WebP lossy and lossless, however
> only Imagick supports animated images.
> * A filter controls the type re-mapping and can be used to opt out of the
> feature entirely, or on a per image or image type basis (eg only convert
> jpegs).
>
> Considerations:
> * We need to research the best compression level to use for WebP. In
> particular, we need to pick a compression level that results in images
> that are very close to the images our current compression defaults
> produce. Some details on testing methodology, plus a link to research
> with a set of test images we can use in this
> [https://core.trac.wordpress.org/ticket/35725 comment].
> * Some browsers still don't support WebP, so we should consider providing
> a https://github.com/chase-moskal/webp-hero shim] (behind feature
> [https://github.com/Modernizr/Modernizr/blob/master/feature-
> detects/img/webp.js detection])for sites that need to support these
> browsers, or whether letting these sites opt out is sufficient.
> * Disabling the feature is a one line code change, still we should
> release a plugin non-technical users can install to disable the feature.
> * Testing, testing, testing!

New description:

 Follow up to #35725 where we introduced support for WebP images. Please
 review this ticket first as many of the changes proposed here have already
 been discussed extensively there!

 By switching to WebP, users won't need to do anything and will benefit
 from faster sites because images will be 25-40% smaller, all with no loss
 of quality. Hosts will benefit from reduced memory usage for compression,
 and reduced storage and bandwidth requirements for images.

 By using WebP as the default image format:

 * Uploaded images are converted to smaller sub-sizes - these images will
 now use the WebP format if the server supports it.
   * Note both GD and Imagick support WebP lossy and lossless, however only
 Imagick supports animated images.
 * A filter controls the type re-mapping and can be used to opt out of the
 feature entirely, or on a per image or image type basis (eg only convert
 jpegs).

 Considerations:
 * We need to research the best compression level to use for WebP. In
 particular, we need to pick a compression level that results in images
 that are very close to the images our current compression defaults
 produce. Some details on testing methodology, plus a link to research with
 a set of test images we can use in this
 [https://core.trac.wordpress.org/ticket/35725 comment].
 * Some browsers still don't support WebP, so we should consider providing
 a https://github.com/chase-moskal/webp-hero shim] (behind feature
 [https://github.com/Modernizr/Modernizr/blob/master/feature-
 detects/img/webp.js detection])for sites that need to support these
 browsers, or whether letting these sites opt out is sufficient.
 * Disabling the feature is a one line code change, still we should release
 a plugin non-technical users can install to disable the feature.
 * Testing, testing, testing!

--

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


More information about the wp-trac mailing list