Make WordPress Core

Opened 7 months ago

Last modified 3 months ago

#52867 closed enhancement

Use WebP as default format for image subsizes (when available). — at Initial Version

Reported by: adamsilverstein Owned by:
Milestone: 5.8 Priority: normal
Severity: normal Version:
Component: Media Keywords: has-patch dev-feedback has-unit-tests needs-testing has-testing-info needs-docs needs-dev-note
Focuses: Cc:


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).


  • 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 comment.
  • Some browsers still don't support WebP, so we should consider providing a https://github.com/chase-moskal/webp-hero shim] (behind feature 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!

Change History (0)

Note: See TracTickets for help on using tickets.