WebP Converter for Media


Speed up your website by serving WebP images. By replacing files in standard JPEG, PNG and GIF formats with WebP format, you can save over a half of the page weight without losing quality.

When installing a plugin you do not have to do anything more. Your current images will be converted into a new format. Users will automatically receive new, much lighter images than the original ones.

As of today, nearly 80% of users use browsers that support the WebP format. The loading time of your website depends to a large extent on its weight. Now you can speed up it in a few seconds without much effort!

This will be a profit both for your users who will not have to download so much data, but also for a server that will be less loaded. Remember that a better optimized website also affects your Google ranking.

How does this work?

  • By adding images to your media library, they are automatically converted and saved in a separate directory.
  • If you have just installed the plugin, you can convert all existing images with one click.
  • Images are converted using PHP GD or Imagick extension (you can modify the compression level).
  • When the browser tries to download an image file, the server verifies if it supports image/webp files and if the file exists.
  • If everything is OK, instead of the original image, the browser will receive its equivalent in WebP format.
  • The plugin does not change image URLs, so there are no problems with saving the HTML code of website to the cache and time of its generation does not increase. It does not matter if the image display as an img HTML tag or you use background-image. It works always!
  • Image URLs are modified using the module mod_rewrite on the server, i.e. the same, and thanks to this we can use friendly links in WordPress. Additionally, the MIME type of the sent file is modified to image/webp.
  • The final result is that your users download less than half of the data, and the website itself loads faster!

WebP images are the future!

Raise your website to a new level now! Install the plugin and enjoy the website that loads faster. Surely you and your users will appreciate it.


  • Screenshot of the options panel
  • Screenshot when regenerating images


  1. Upload the plugin files to /wp-content/plugins/webp-converter-for-media/ directory, or install plugin through the WordPress plugins screen directly.
  2. Activate plugin through Plugins screen in WordPress Admin Panel.
  3. Use Settings -> Settings -> WebP Converter screen to configure the plugin.
  4. Click on the button Regenerate All.
  5. Check if everything works fine.

That’s all! Your website is already loading faster!


What are the requirements of the plugin?

Practically every hosting meets these requirements. You must use PHP at least 5.6 and have the GD or Imagick extension installed. The extension must support WebP format (you can check it using phpinfo() function).

An example of the correct server configuration can be found here.

These are native PHP extensions, used among others by WordPress to generate thumbnails. Your server must also have the modules mod_mime, mod_rewrite and mod_expires enabled.

If your configuration is different, please contact your server administrator. He is the most competent to solve such problems. Due to the huge amount of possible server environments, we are not able to help you with its configuration. Surely the server administrator will be able to do it best.

Also REST API must be enabled and work without additional restrictions.

Are there any settings?

Yes, at any time you can determine which image formats you want to support. Currently JPEG, PNG and GIF are available. In addition, you have an option to change the compression level, which can be set from 75% to 100%. The default value is 85% and in most cases it is the most optimal value.

How can I convert existing images after installing?

In the WordPress admin panel, on the Settings -> WebP Converter subpage there is a module that allows you to process all your images. It uses the WordPress REST API by downloading addresses of all images and converting all files gradually. This process may take few or more than ten minutes depending on the number of files.

Where are the converted images stored?

All WebP images are stored in the /wp-content/uploads-webpc/ directory. Inside the directory there is the same structure as in the original uploads directory. The files have original extensions in the name along with the new .webp. In case the location of the original file is as follows: /wp-content/uploads/2019/06/example.jpg then its converted version will be in the following location: /wp-content/uploads-webpc/2019/06/example.jpg.webp.

REST API error

While trying to convert images, you get an error An error occurred while connecting to REST API. Please try again.? This means that you have blocked the REST API in your WordPress. By default it is enabled, so it has been blocked by some plugin or your server. The REST API is required for the proper functioning of this plugin.

How to check if plugin works?

When you have installed plugin and converted all images, follow these steps:

  1. Run Google Chrome and enable Dev Tools (F12).
  2. Go to the Network tab and select filtering for Img (Images).
  3. Refresh your website page.
  4. Check list of loaded images. Note Type column.
  5. If value of webp is there, then everything works fine.
  6. Remember that this plugin does not change URLs. This means that e.g. link will have path to .jpg file, but .jpg.webp file will be loaded instead of original .jpg.
  7. In addition, you can check weight of website before and after using plugin. The difference will be huge!
  8. More information: here
Can I enable browser caching for WebP images?

Yes of course. The plugin allows this by using the module mod_expires. Thanks to this, we can even speed up page loading time for returning users because they do not need to re-download files from the server. If you do not want to use this functionality, you can turn it off at any time.

Does the plugin support CDN?

Unfortunately not. This is due to the logic of the plugin’s operation. Plugins that enable integration with the CDN servers modify the HTML of the website, changing URLs for media files. This plugin does not modify URLs. Replacing URLs in the HTML code is not an optimal solution.

The main problem when changing URLs is cache. When we modify the image URL for WebP supporting browser, then use the browser without WebP support, it will still have the URL address of an image in .webp format, because it will be in the cache.

While in the case of the img tag you can solve this problem, in the case of background-image it is possible. We wanted full support so that all images added to the media library would be supported – no matter how they are displayed on the website.

Therefore in this plugin for browsers supporting the WebP format, only the source of the file is replaced by using the mod_rewrite module on the server. The URL for image remains the same. This solves the whole problem, but it is impossible to do when the files are stored on the CDN server.

If you are using a CDN server, find one that automatically converts images to WebP format and properly sends the correct image format to the browser.

Does the plugin work in Multisite Network?

Yes, with one exception. In this mode it is not possible to automatically generate the contents of .htaccess file.

Please manually paste the following code at the beginning of .htaccess file:

# BEGIN WebP Converter
<IfModule mod_mime.c>
  AddType image/webp .webp
<IfModule mod_rewrite.c>
  RewriteEngine On
  RewriteCond %{HTTP_ACCEPT} image/webp
  RewriteCond %{DOCUMENT_ROOT}/$1/uploads-webpc/$2.jpg.webp -f
  RewriteRule (.+)/uploads/(.+)\.jpg$ $1/uploads-webpc/$2.jpg.webp [T=image/webp]
  RewriteCond %{HTTP_ACCEPT} image/webp
  RewriteCond %{DOCUMENT_ROOT}/$1/uploads-webpc/$2.jpeg.webp -f
  RewriteRule (.+)/uploads/(.+)\.jpeg$ $1/uploads-webpc/$2.jpeg.webp [T=image/webp]
  RewriteCond %{HTTP_ACCEPT} image/webp
  RewriteCond %{DOCUMENT_ROOT}/$1/uploads-webpc/$2.png.webp -f
  RewriteRule (.+)/uploads/(.+)\.png$ $1/uploads-webpc/$2.png.webp [T=image/webp]
<IfModule mod_expires.c>
  ExpiresActive On
  ExpiresByType image/webp "access plus 1 year"
# END WebP Converter


6 de diciembre de 2019
After all, there is a plugin that does what it takes well! Generating webp photos without problems in a working website is finally possible and safe 🙂 Thank you for such a good solution 🙂
26 de noviembre de 2019
This lightweight plugin provide very good support for webp file. Until it is become norm, just use it. It uses url rewriting and in my case even working well with Smush. And unlike other "freemium" that limit the number of images processed, this plugin is nothing like that.
Leer todas las 20 reseñas

Colaboradores y desarrolladores

«WebP Converter for Media» es un software de código abierto. Las siguientes personas han colaborado con este plugin.


«WebP Converter for Media» ha sido traducido a 1 idioma local. Gracias a los traductores por sus contribuciones.

Traduce «WebP Converter for Media» a tu idioma.

¿Interesado en el desarrollo?

Revisa el código , echa un vistazo al repositorio SVN o suscríbete al registro de desarrollo por RSS.

Registro de cambios

1.0.6 (2019-11-06)

  • Automatic deletion of converted files larger than original
  • Changed way of generating file path (without ABSPATH)

1.0.5 (2019-09-16)

  • Adding information on available FAQ

1.0.4 (2019-07-11)

  • Update limits of maximum execution time

1.0.3 (2019-06-26)

  • Security changes

1.0.2 (2019-06-25)

  • Tab in settings page about server configuration
  • Modification of error messages

1.0.1 (2019-06-23)

  • Securing access to REST API
  • Error handler for undefined gd extension

1.0.0 (2019-06-16)

  • The first stable release