Feature Description
Existing WebP/Image plugins in the repository already support WebP, and many sites are already generating and using WebP sub sized images. In fact, around 13% of WordPress desktop pages in the httparchive dataset use WebP images!
Once core starts generating and outputting WebP images by default, it would be good to use the existing WebP images users have already generated on their sites. To enable this, we can give plugins a filter they can use to adjust the alternate images used, so when we generate a webp image tag and go to check that the image has the WebP sub sizes we need, plugins could return their own webp image data instead.
Original raised by Anton in slack.
Related to #22
Sub-issues:
Note: discussion happening in this doc
Feature Description
Existing WebP/Image plugins in the repository already support WebP, and many sites are already generating and using WebP sub sized images. In fact, around 13% of WordPress desktop pages in the httparchive dataset use WebP images!
Once core starts generating and outputting WebP images by default, it would be good to use the existing WebP images users have already generated on their sites. To enable this, we can give plugins a filter they can use to adjust the alternate images used, so when we generate a webp image tag and go to check that the image has the WebP sub sizes we need, plugins could return their own webp image data instead.
Original raised by Anton in slack.
Related to #22
Sub-issues:
webp_uploads_pre_generate_additional_image_sourcefilter to support returningfilesizevalue #333Note: discussion happening in this doc