WebP Uploads and automatic image file conversion in WordPress

How to upload and use WebP image files on WordPress and which benefits the WebP Uploads plugin has to offer.

I recently looked deeper into how WordPress handles the supposedly more performant WebP image type. This brought me to the WebP Uploads plugin, which I am looking into more deeply here.

WebP without a plugin

The information in this article is for users who prefer to use the WebP image format but keep uploading JPEG files.

You don’t need any plugin if WebP is your original format. Since version WordPress 5.8 – that is 2021 – you can upload and display WebP files without a plugin.

Performance Labs > WebP Uploads

The WebP Uploads plugin was originally part of the Performance Lab plugin. This is a plugin by the WordPress community aiming to improve the speed of WordPress sites. Eventually, the features might become part of the WordPress core.

Shortly before writing this post, I updated Performance Lab to version 2.8.0 and was prompted with a message that certain features are now individual plugins. WebP Uploads is just one of many of them.

WebP Uploads – what does it do?

I first learned about the performance benefits of WebP images when analyzing my sites with Google PageSpeed Insights. For years now, they have suggested using “modern” image formats.

By the way., Google itself developed the WebP format and published it in 2018. So, no wonder they are promoting it. For a long while, I hesitated to use WebP because it wasn’t supported by all popular browsers. Luckily, this has changed.

As you can see on the screenshot, Google also suggests using the Performance Lab plugin.

Convert JPEG into WebP automatically

When you upload a new JPEG image (not PNG or GIFs!), the WebP Uploads plugin automatically converts it into the WebP format. It also creates different sizes of images to display on smaller devices.

However, this only applies to images uploaded after the plugin was installed.

As usual, the WebP images show up in your Media Library, and you can find them in the wp-content/uploads folder.

The original JPEG file is also stored on your server but not displayed in the frontend anymore.

The WebP Uploads plugin only does its magic on upload. Once the image is uploaded and converted, you could theoretically remove the plugin, and the WebP images will still appear.

You can also create JPEG files of different sizes – as WordPress would normally do – alongside the WebP files. To do that, enable the option Settings > Media > Uploading Files > Generate JPEG files in addition to WebP.

Again, this option only affects newly uploaded images and would not generate resized JPEG files for older uploads.

Convert existing images into WebP

As mentioned, the WebP Uploads plugin would not convert existing images into the WebP format.

I can only imagine how hard this would be to implement since WordPress often stores exact URLs in the content. Just converting an image into a new format could invalidate such URLs and cause the image not to appear.

There are multiple solutions to convert existing images into WebP. Below, I list three solutions I have an opinion about, though I am only using one of them actively.

Be aware that none of the mentioned solutions are free. Many need a subscription. Some come with a free plan. I guess image compression is costly or just simpler to do on the vendor’s hardware than on unknown WordPress installations.

There is no affiliate relation between me and any of the mentioned solutions.

ShortPixel

Many years ago, I was lucky to get a lifetime deal for ShortPixel. Since then, it has run on one of my blogs. It allowed me to convert existing images into WebP and do that on the fly for new ones.

Imagify

I am a huge fan of the WP Rocket caching plugin. Naturally, their Imagify plugin comes to mind when thinking about image optimization. They have a free tier that should suffice for many small sites.

Smush

An argument to try Smush by WPMU DEV is the astonishing number of more than 1 Mio active users, according to wordpress.org. I never used it personally, but I have seen it installed on many sites running my Image Source Control plugin.

Conclusion

What have we learned?

You don’t need a plugin to upload and use WebP files.

Use the free WebP Uploads plugin to convert newly uploaded JPEG files into WebP.

You might need a proprietary plugin or service to convert existing images into WebP.

Check out Image Source Control to display author attributions to your uploaded images.

Portrait of Thomas Maier, founder and CEO of Image Source Control

Questions? Feedback? How can I help?