Since WordPress 5.8 included WebP image support, WordPress users have slowly transitioned from JPG, GIF, and PNG image files to using the modern image format.
Known for its lossy and lossless compression, WebP images can be 30% smaller than the same file in JPG, GIF, or PNG format.
Which means improved site performance and a better experience for users.
Added bonus: using WebP format saves bandwidth and storage for your site.
What is WebP?
If you haven’t heard of it, WebP is a relatively new image format.
Well, kind of.
It was first introduced in 2010 by Google as a lossy image format. Over time, the WebP format evolved as Google added transparency, animation, and lossless compression.
Chrome has native support for WebP; major browsers like Firefox, Safari, Edge, and Opera eventually added support over the years.
(Note: Safari only supports if you’re on Big Sur and later versions.)
As of July 2022, Can I Use reports WebP support is available in ~97% of browsers.
With good browser support, many people are now using WebP image formats on the web.
What to Know about WebP Support Across Social Networks
Be aware, while browsers have excellent support for WebP format, it’s not well-supported across social networks.
I only learned about social network support last week, from a tweet by Joost de Valk
So… I’ve been testing WebP support across social networks, especially to see whether they support sharing URLs that have a WebP image as its social image. The results are… varied.
— Joost de Valk (@jdevalk) July 5, 2022
I suspect WebP support will be implemented on social networks in the near future, as the format continues to become more popular.
How Can I Convert Images to WebP?
That’s the question Carrie Dils asked on Twitter.
Have to admit, I was surprised by the number of options people offered in their replies.
I had no clue there were so many alternatives.
People may not be aware the options already exist in their site setup. Without requiring anyone to take extra steps.
Here’s a list of options for converting images to WebP format:
-
Content Delivery Network (CDN)
If you’re using a CDN on your site, it’s likely taking care of the conversion for you. From providing the WebP format automatically (with a fallback for browsers not supporting WebP) to compression, image sizing, and serving the files.
For example, I use Jetpack on this site and have enabled their Site Acceleration feature (formerly known as Photon CDN). It automatically serves WebP images, with a fallback.
Cloudflare is similar, but may require some modifications. If you’re on WP Engine hosting, their CDN uses Cloudflare.
-
WordPress Plugins
A slew of WordPress plugins provide support for converting images to WebP format, including Imagify, ShortPixel, Smush, and EWWW Optimizer.
Search the plugin repository for plugins that convert to WebP images.
-
Photoshop
Create or edit an image within Photoshop. Use File > Save As /Save a Copy to save in WebP format.
-
Online Photo Editors
The free online photo editors Photopea and Pixlr offer WebP support. I don’t use Photopea, but I have used Pixlr.
Within Pixlr, once you’re finished editing your image, use File > Save and choose the WebP format.
-
Online Converters
If you’re only looking to convert one or a few image files to WebP format, check out the free converters at Squoosh, EZGif, or CloudConvert.
For a large number of files which also need to be bulk resized, check out Birme or Bulk Resize Photos (both are free).
-
Pre-compiled WebP Converter
Google offers precompiled utilities you can download for Windows, Linux, and Mac. From their description:
cwebp
encodes images in either JPEG, PNG or TIFF format into WebP, whiledwebp
decodes them back into PNG -
PressThumb
If you’re a customer of Pagely’s managed WordPress hosting solutions, you can use their on-demand image optimization service.
Wrapping Up
WebP files improve the speed of your site and experience for your users. Who doesn’t want a faster loading website?
Based on what I learned, the easiest way to get WebP support on your site: use a CDN. If you’re not using a CDN, check out one of the other options I highlighted in this post.
Thanks to Carrie Dils for asking the question. Glad she agreed to have me publish a post about it.
Shoutout to all the folks who replied to her on Twitter with recommendations, including Nick Croft, Ben Dunkle, Jeff Mattson, Andy von Busse, Unagwu Chimezie, Daniel Schutzsmith, Ben, Christopher Carfi, Ryan Townley, and Andrew Isherwood.
Have you started using WebP format on your site? Share your thoughts in the comments.