Last updated on

How to use W3 Total Cache WebP Conversion Image Service?

Enabling W3 Total Cache Image Service

The first step to using the WebP conversion Image Service is to enable the feature in the Extensions list for W3 Total Cache. New W3 Total Cache installations will have the extension enabled by default, but existing installs will need to activate it manually. Navigate in your WordPress admin to Performance > Extensions to begin enabling it.

w3 total cache extension menu item in wordpress admin

Locate the Image Service item in the list of Extensions and enable it.

activated image service in w3 total cache extensions list

All images converted with the Image Service tool are sent to a third party server maintained by the W3 Total Cache team which reduces resource consumption and allows for a large number of conversions in environments where resources can be limited such as shared hosting. Images sent to the W3TC server for conversion are only held temporarily and no permanent information is kept on the server regarding the images.

WebP optimizations with the Image Service tool do not replace the original image file and all conversions can be reverted without any loss of data.

The settings page for the Image Service extension allows you to toggle the conversion type between Lossy (default) or Lossless and configure automatic conversions for new image uploads to your website. Lossless conversions can sometimes result in larger file sizes for JPEG and some other formats but will usually decrease the size when converting PNGs.

w3 total cache image service conversion settings

Convert images in the Media Library

Once the Image Service extension is enabled open up your Media Library to begin converting images to the WebP format. The Image Service tool is only available while the Media Library is in List view and you can use the controls in the Media Library to switch to List mode if it is in the default Grid display.

list view option in media library

Images can be converted selecting the Convert link for each image individually or using the Bulk Actions tool and choosing W3 Total Optimize from the list.

single image conversion option in media library

bulk conversion option in media library

Images can also be reverted through the Media Library either individually or with the W3 Total Optimize Revert option in the Bulk Actions list.

single image revert control in media library

bulk revert option in media library

Bulk WebP Conversions with Total Cache Image Service

Enabling the Image Service Extension also adds the Total Cache Image Service under Media in the WordPress admin menu, which allows for bulk conversions or reversions of the entire Media Library at once. Use the Convert All or Revert All buttons in the Tools section to manage your WebP image conversions for the entire Media Library at once.

convert all and revert all buttons in image service tools section

What can I do after reaching the monthly conversion limit?

Free W3 Total Cache users have a limited number of conversions that they can run in a monthly period. W3TC Pro users however do not have this limitation and upgrading to a Pro license will be helpful if you have a large number of images that you wish to convert immediately. Upgrading to a Pro plan will allow you to finish all of your conversions in addition to providing access to all of the other Pro features like Fragment Caching, Deferred CSS, and user Statistics.

Troubleshooting

How To Serve Images In Next-Gen Formats In WordPress (WebP)

There might be instances where you’ve converted all of your images to WebP and still receive this message from PageSpeed Insights in the performance report.

The important note here is that the smallest image will always be served to visitors, regardless of the image format. Lossless conversion sometimes creates an image that is larger than the original, which would then cause the original image to be served instead of the WebP one.

Try switching to Lossy conversion if you still see the message, but if that doesn’t work then you can likely ignore the message since the most optimized image is already being used.

Using Plesk and NGINX caching with proxy mode

First, remove image extensions (jpg, jpeg, webp, png) from “Serve static files directly by nginx.” See these instructions from Plesk to find this setting.
Then, copy the rewrite rules from your Performance > Install menu, and use the W3 Total Cache rewrite rules in the Plesk Additional nginx directives setting.

Missing Additional Image Sizes

If you find that your original image has been converted to WebP, but other image sizes are missing WebP versions, you may need to double-check that your WordPress environment supports the WebP format.

While the original image is converted via our API service, the different sizes (e.g. Large, Medium, Thumbnail) are created by your own server. For this, you must have WordPress 5.8 and the appropriate libGD or ImageMagick package available on your server.

To check if your WordPress environment supports WebP, navigate to Site Health > Info > Media Handling and double-check that WebP is listed in the supported file formats for the library shown in the Active editor. If you find these are missing the WebP extension, consult your system administrator to set up the correct packages.

Users of cPanel CentOS 7 servers can follow these instructions to enable WebP support for ImageMagick.

“Unable to connect to the filesystem” Error

If you’re using an “Indirect” filesystem access method, such as ssh2, FTP Socket, or FTPext, you may have difficulty performing image conversions. Generally, if you’re frequently prompted for credentials when performing tasks in your dashboard, then both automatic and bulk conversions will not work. Consider setting the constant define( 'FS_METHOD', 'direct' );, or placing your credentials in wp-config.php according to these instructions from WordPress.org.

Additional Resources

W3 Total Cache

You haven't seen fast until you've tried PRO

   Full Site CDN + Additional Caching Options
   Advanced Caching Statistics, Purge Logs and More

Everything you need to scale your WordPress Website and improve your PageSpeed.

8 thoughts on “W3 Total Cache WebP Image Service

  1. As I understand this, rewrite rules are used to deliver the webp content instead of the jpg. Is this compatible with hosting on IIS? So far it is not working for me, even after invalidating my CDN cache.

    • Hi Assad,

      The Monthly limit for free users 100000 images and it’s subject to change.
      We have graciously higher limits for free plugin users for the initial release. Please do note that the order of the conversion takes into account if the user has a Pro license or not.
      Thanks!

  2. Hi i’m trying out this service today. I can see some images already converted.
    But when i view them, they are still in jpeg format. When i check in google inspector / network it’s still showing original jpeg with full size and no sign of converted image.

Leave a Reply to Assad Cancel Reply

Your email address will not be published.