WordPress’ Performance Team has published a feature proposal that would enable WebP images by default, expanding core support for the modern image format.
In July, 2021, WordPress 5.8 introduced WebP support, allowing users to upload and use WebP images in their content. If the proposal is approved, version 6.0 will generate WebP images by default for new JPEG uploads and will use WebP images by default for website content.
“WebP was developed as a modern image format that provides superior compression on the web,” WordPress core contributor Adam Silverstein said in the feature proposal. “Images are often some of the largest resources used by websites, and using WebP creates websites that are lighter and faster. Compared to JPEG images, WebP images generated by WordPress are almost always smaller, with a ~30% file size reduction on average (with the same visual quality).”
With WebP enabled by default, WordPress users would not experience any changes to their usual image upload workflow. WordPress would automatically convert JPEG uploads to WebP in the background and use them on the website.
According to Can I Use, the WebP image format is supported by 94.25% of web browsers. A very small number of browsers, such as Internet Explorer 11 or Safari on MacOS < v11 Big Sur, do not support WebP.
The proposed feature would ship with two filters to control or disable WebP uploads, and a user-friendly plugin would be created to do the same.
Despite the significant performance benefits, support for the feature proposal is not unopposed. Several contributors participating in the discussion expressed concerns about email clients and social media platforms not supporting WebP.
“I feel like WebP is not yet ready to become a ‘hardcoded default’ in the post_content
due to all the reasons mentioned in the previous comments,” Kaspars Dambis said. “Many web clients (which are not just browsers) don’t support WebP formats — RSS clients, email clients, smart TVs, ebook readers, open graph parsers, desktop image viewers, etc. These are all important users of the web.”
Silverstein answered these concerns, confirming that WordPress will continue generating the JPEG image sub sizes as it always has.
“One important note about what this feature doesn’t change: JPEG sub sizes are still generated and stored in the same meta fields,” he said. “For that reason, consumers of RSS feeds or REST media endpoints or OG tags for example will continue to use the JPEG sub sized versions.”
The Performance Team contributors are targeting WordPress 6.0 for enabling WebP by default and are seeking approval from maintainers of the image component. Anyone is welcome to test the feature by installing the Performance Lab plugin with the “WebP Uploads” module activated. Testers are encouraged to leave feedback on the Trac ticket or Pull Request.