WebP support is coming to WordPress 5.8. This modern image file format was created by Google in September 2010, and is now supported by 95% of the web browsers in use worldwide. It has distinct advantages over more commonly used formats, providing both lossless and lossy compression that is 26% smaller in size compared to PNGs and 25-34% smaller than comparable JPEG images.
WebP is currently used by 1.6% of all the top 10 million websites, according to W3Techs, and usage has increased over the past five years.
Adding WebP support to core won’t make all WordPress sites instantly faster, but it will give every site owner the opportunity to reduce bandwidth by uploading WebP images. In the dev note, Adam Silverstein suggested converting images to WebP using command line conversion tools or web based tools like Squoosh, but there are also many plugins that can perform conversion on upload.
WebP Express uses the WebP Convert library to convert the images and then serves them to supporting browsers. It is used on more than 100,000 WordPress sites. Imagify is one of the most popular plugins in use with more than 500,000 active installs. It has a Bulk Optimizer tool that can convert previously uploaded images with one click. The EWWW Image Optimizer plugin, used on more than 800,000 websites, also has support for automatically converting images to the WebP format.
By default, WordPress will create the sub-sized images as the same image format as the uploaded file. More adventurous users can experiment with Silverstein’s plugin that offers a setting for specifying the default image format used for the sub-sized images WordPress generates. A new wp_editor_set_quality
filter is available for developers to modify the quality setting for uploaded images.
“The media component team is also exploring the option of having WordPress perform the image format conversion on uploaded images – using WebP as the default output format for sub-sized images,” Silverstein said. “We are also keeping our eyes on even more modern formats like AVIF and JPEGXL that will both improve compression and further reduce resources required for compression.”
WordPress 5.8 is expected to be released on July 20, introducing WebP support for uploads. The new release also adds information to the Media Handling section of the Site Health screen, showing the ImageMagick/Imagick supported file formats for the site in case users need it for debugging.