WordPress introduced support for WebP images with the release of WordPress 5.8 in July 2021. Some users saw this as a step forwards in modernizing WordPress websites’ performance.
In late March 2022, the Performance Team proposed enabling WebP image conversion by default on WordPress. This was met with pushback from the community as there were concerns about compatibility across WordPress versions, browsers, and email providers.
The performance team addressed these concerns and agreed to do some further research to assure users would not be affected if WordPress Core adopted the controversial proposal.
On June 30, 2022, Adam Silverstein brought the proposal back with some additional research on how it could change WordPress’s future direction.
- What Is the WebP Format?
- Research and a Revised Proposal
- Plans for the Future
What Is the WebP Format?
WebP is a type of image format (similar to JPEG or PNG) developed by Google to speed up website performance and lower bandwidth usage without sacrificing image quality.
Google uses what is known as lossless and lossy compression methods.
- Lossless – a type of compression that does not lose any image quality, only rearranges how the image is stored. This means that while it is compressed, the image can be restored to its original state for editing.
- Lossy – compresses images by removing bit data from the picture, which results in up to 90% compression. There is a slight drop in quality when using Lossy compression, and the image cannot be restored to its original state for editing.
Google offers a gallery for users still unsure if converting their images to WebP is right for their site.
How does this Affect Your WordPress Site?
In simple terms, WebP images do not hurt your WordPress installation. They are compressed versions of the photos, so it helps with optimization, which in return helps with SEO and hosting resources.
WebP format is controversial in the WordPress community because it is not compatible across the board. Most browsers and most email providers support it, but there is still uncertainty about access to all users.
There were also concerns about image sizes and how they would affect users’ hosting disk space, which the team promised to do further testing.
Research and a Revised Proposal
Because of the criticism of what using WebP by default on all WordPress installations could mean for its millions of users, the Performance team took the idea back to the drawing board to conduct research.
The team surveyed 17 hosting providers to research the impact of this change and reported that 97% of email clients and web browsers support WebP.
For mobile apps, it was found that iOS 14+ apps are compatible with WebP; older versions would be served JPEG images as an alternative. Android has supported WebP formats since Android 4.0.
The current top RSS feeds support WebP images; therefore, the team does not see a lot of issues with the inclusion of this format.
OpenGraph tags have mixed support, so it is recommended that OpenGraph tag users remain using the JPEG format.
Disk Space Concerns
After surveying hosting companies, the team reported that most sites (> 86%) would be unaffected, even if their storage requirements doubled…some lower-end hosting plans with limited storage also lack WebP support in their hosting stack, which means they won’t get extra image generation anyway.
To address disk space concerns, the Performance Team also wants to add a new parameter to the `add_image_size()` function, so developers must specify if the image size should generate secondary MME types.
Additionally, the following changes were made to address disk space concerns:
- 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 specific image sizes, such as those not used in front-end content.
Something to note is that while Silverstein mentioned less than 86% of sites would be affected by an increase in file storage, 14% of users is a pretty considerable number when it comes to WordPress installations. This percentage, and the small pool size of 17 unnamed hosting companies, have brought criticism from the community.
Some users did call into question using WebP over AVIF image format, the latter of which has shown to compress images better while keeping quality intact. Bethany Chobanian Lang, a Performance Team member, responded that the team is looking into AVIF; however, the format is only available for less than 72% of the web, compared to WebP’s nearly 95% compatibility.
The Future of WebP Images in WordPress
The Performance Team and many WordPress users are looking forward to the changes the introduction of WebP by default would mean to WordPress speed. It has also been mentioned there would be a way to turn this setting off while in the Dashboard so users who are more cautious of this move can feel safe testing the format.
Silverstein outlined that the team is updating its core path to reflect these new changes. Users can provide feedback in a Trac ticket. The team hopes to merge these changes early in WordPress 6.1 release cycle for testing.