WordPress 5.8 added support for WebP in 2021, serving users to upload and use the images in their content with the help of plugins. A new plan on whether to include WebP directly into WordPress 6.1 has just been revealed based on the company’s assessment findings.
Adding WebP by default on WordPress 6.1
WebP is an image file format developed by Google that offers high-quality images that take less space than JPEG or PNG. It compresses images better, reducing image files’ sizes; resulting in a better performance. A year ago, WordPress 5.8 introduced support for WebP, enabling users to upload and use WebP images in their content with plugins.
In March 2022, the WordPress Performance Team have begun discussing bringing WebP by default into WordPress core. However, after a month of investigation, WordPress put it on hold due to WebP concerns received from its community.
The details of reassessment and summary of findings were shared by Performance team contributor Adam Silverstein on a blog. The research shows more than 97% of web browsers are compatible, as are more than 97% of email clients. For the evaluation of the overall impact on storage on hosting when WebP image generation is activated, the team surveyed hosting providers.
86% will not be affected at all
17 responses were received and indicated that 86% of users would be unaffected by a doubling of their storage requirements, which is caused by the necessity of keeping both JPG/PNG and WebP files for backward compatibility. Based on these results, a new proposal has been released addressing to the concerns and updated in the core patch to reflect revisions. You can see the changes in the proposal below:
- Automatically generating WebP versions of only core image sizes in 6.1 by default. Custom image sizes will initially have to opt in to receive automatically generated WebP versions, or opt-out if they are exclusively used for special cases where WebP is not beneficial or supported.
- Keeping secondary (WebP) sub-sizes only if they are smaller than the primary MIME type.
- Only generating WebP images for image sizes that are intended for use in user-facing front-end content. This avoids wasting storage space for WebP images that will never be used.
- Introducing a filter to control the generation of additional MIME types based on image sub-sizes. This enables developers to exclude certain image sizes, such as those that are not used in front-end content.
Now, WordPress’s current plan is to merge the change early in the 6.1 release cycle so that it can be tested thoroughly. Additional feedback regarding this revised approach can be left on this post or the Trac ticket.