How to convert all your images to WebP on WordPress

WordPress, out of the box, will provide some image size reduction and compression, which by itself does provide WordPress SEO benefits as well as improving the user experience.

However, in most cases you can reduce the image size even further by opting to use a next-generation image format called WebP whenever possible.

But what exactly is WebP, and how does it help you improve your website’s performance?

What is WebP in WordPress and how does it improve WordPress SEO?

WebP is a new image format developed by Google which provides better compression than JPEG or PNG. Unlike JPEG, it supports transparency, which means you can convert both JPEG and PNG files into WebP.

One great thing with WebP and WordPress is that you can even convert images to WebP after compressing them with a different plugin, and you’ll still see an improvement in file size.

But why do I need to use WebP?

That’s a great question. In most cases, using WebP will improve your WordPress SEO and page speed for users from all over the world.

But specifically, if we’re looking at Google’s Page Speed tool, it gives you additional points for implementing WebP. Let’s see an example.

I’ll be testing a website first without WebP, and then with WebP.

On this test, you can see that only after converting some of the images to WebP, the mobile score is already increased by 4 points.

What you don’t know about this testing yet is that I tried to put the WebP testing at a huge disadvantage here just to show you how much Google pays attention to this.

Here are the Pingdom results for both sets:

I achieved this by adding additional PHP load on the website to ensure that even with a lower page size, the page loaded much slower.

Now, imagine the effect this can have on your website SEO if you have it fully optimized and all images converted to WebP.

How to convert your WordPress images to WebP

There’s one caveat to WebP, though, older browsers do not support it. While this is not an issue in most cases, it will also depend on your audience type.

It’s generally a good practice to – instead of converting all images to WebP and removing the JPEGs and PNGs – serve both JPEG/PNG and WebP based on the browser that is visiting. Sometimes, the crawler might visit from a browser which does not support WebP and this can reduce your WordPress SEO.

Unfortunately, in some cases where you are not able to cache your website/page, this adds an additional job to the server to determine whether to server WebP.

The newest versions of most modern browsers do support WebP, but some older versions do not. You can view the full compatibility list here.

With that out of the way, let’s get into the how of using WebP with WordPress.

LiteSpeed Cache

One of the great benefits of Eltris hosting is that you have access to the LSCache plugin, which provides excellent page optimization and connects to our LiteSpeed server back-end to perform better optimization.

But LSCache also has a function to optimize your images and convert them to WebP. To do this, you will need to connect to the quic.cloud CDN. To do this, you will need to get an API key from the plugin’s General section.

Once you do this, there are quite a few options you can configure under the Image Optimization Tab.

One important factor to consider here is whether you want to automatically optimize the images or you want to manually request optimizations periodically.

WebP Express

First, let’s check out a free option for serving all your images in WebP format.

WebP Express is a lightweight plugin which converts your images to WebP on your server using existing PHP libraries. This is sometimes a disadvantage if you are on a shared server with not many resources assigned to you.

But because it converts on your server, it does not need to use an external API, which means it can be free.

To use WebP Express, you’ll need to have one of the following available to you:

  • GD PHP Extension
  • GrahpicsMagick PHP extension
  • Imagick CLI or PHP extension
  • Cwebp
  • Vips
  • FFMPEG

You can also add remote servers for converting to WebP:

  • EWWW Cloud Converter
  • Remote WebP Express

Most hosting companies will have at least GD installed.

Once you enable WebP, open the settings and configure it as you like. Usually, a good configuration is to enable the three .htaccess rules for WebP generation and disable conversion when uploading. This helps you save on storage.

You can also use it with caching using the Cache Enabler plugin.

EWWW Image Optimizer

One of the paid options to optimize your images is EWW Image Optimizer, which provides combined optimization – meaning it will first optimize your JPEGs and PNGs and then convert them to WebP.

When you install this plugin, you’ll get the following screen:

Once you select your options from here, you’ll see the recommended settings for your website.

While EWW Image Optimizer works without any subscription, having a subscription will provide much better optimizations and improve your WordPress SEO even further.

The paid version includes a CDN which automatically coverts images as they are served. This takes additional load off your server and allows you to use their industry-leading compression algorithms for even more file size reduction.

Imagify

Imagify is a little different to the other two options on this list, as it doesn’t have a fully free version. Instead, you need to sign up for their API and then enter the API key in WordPress to connect the plugin to their servers.

However, there’s a low limit to how many images you can optimize with the free version, so you will most likely need to use the paid version if you are working on a larger website.

For $9.99 per month, you can optimize an unlimited amount of images on a monthly basis.

With that price, you get to optimize an unlimited amount of images, and convert them to WebP for supported browsers.

You get similar options to EWW Image Optimizer, which are to:

  • Optimize JPEG/PNG images
  • Convert them to WebP
  • Resize them to a maximum width/height specified

Final thoughts

Running a larger website can get difficult at times, especially if more users are uploading photos – it’s nearly impossible to get everyone to optimize their images before uploading them to the website to improve your WordPress SEO.

But these plugins are especially useful for websites where there is user-generated content, as there’s no way to enforce them to upload optimized images.

If you’re making a profit from your website, it might be time to look into a paid solution to make your life easier.