WebP Converter for Media

Description

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.

Screenshots

  • Screenshot of the options panel
  • Screenshot when regenerating images

Installation

  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!

FAQ

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).

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.

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.

Reviews

15. rujna 2019.
If you don't see the media change make sure to click Save on the Permalinks screen to update the rules. Other than that, it works flawlessly.
22. kolovoza 2019.
ESPAÑOL: Hola, tengo las imágenes guardadas en un subdominio (cdn.mywebsite.com). Pero no me crea una nueva carpeta con el nombe de img, puesto que el plugin la crea en en la carpeta Uploads. Esa carpeta por defecto de WordPress no la utilizo. Entonces tengo todas las imagenes Webp y las originales todas juntas. ¿Cómo podría solucionarlo? Gracias. Muy buen plugin. INGLÉS: Hi, I have the images saved in a subdomain (cdn.mywebsite.com). But it doesn't create a new folder with the name of img, since the plugin creates it in the Uploads folder. I don't use that default WordPress folder. Then I have all the Webp images and the originals all together. How could I fix it? Thank you. Very good plugin
08. kolovoza 2019.
This is it! I've tried every single WebP plugin on this directory (even the ones that support CDN), none of them gave me a performance like this one! Thanx to developers, keep it up the good work :))
17. srpnja 2019.
The plugin is easy to install and configure. Great job!
Pročitajte svih 8 recenzija

Suradnici i Programeri

“WebP Converter for Media” is open source software. The following people have contributed to this plugin.

Contributors

Prevedite “WebP Converter for Media” na svoj jezik.

Interested in development?

Browse the code, check out the SVN repository, or subscribe to the development log by RSS.

Changelog

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