Plugin / WebP Converter for Media

Mateusz Gbiorczyk

Frequently Asked Questions (FAQ)

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. Also REST API must be enabled and work without additional restrictions.
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.
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.
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.
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.
When you have installed plugin and converted all images, follow these steps: Run Google Chrome and enable Dev Tools (F12). Go to the Network tab and select filtering for Img (Images). Refresh your website page. Check list of loaded images. Note Type column. If value of webp is there, then everything works fine. 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. In addition, you can check weight of website before and after using plugin. The difference will be huge! More information: here
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.
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.
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 AddType image/webp .webp 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] ExpiresActive On ExpiresByType image/webp "access plus 1 year" # END WebP Converter

Ratings

5
17 reviews

Rating breakdown

Details Information

Version

1.0.6

First Released

10 Dec, 2015

Total Downloads

8,331

Wordpress Version

5.0 or higher

Tested up to:

5.3

Require PHP Version:

5.6 or higher

Tags

Contributors

Languages

The plugin hasn't been transalated in any language other than English.

DIRECTORY DISCLAIMER

The information provided in this THEME/PLUGIN DIRECTORY is made available for information purposes only, and intended to serve as a resource to enable visitors to select a relevant theme or plugin. wpSocket gives no warranty of any kind, express or implied with regard to the information, including without limitation any warranty that the particular theme or plugin that you select is qualified on your situation.

The information in the individual theme or plugin displayed in the Directory is provided by the owners and contributors themselves. wpSocket gives no warranty as to the accuracy of the information and will not be liable to you for any loss or damage suffered by you as a consequence of your reliance on the information.

Links to respective sites are offered to assist in accessing additional information. The links may be outdated or broken. Connect to outside sites at your own risk. The Theme/Plugin Directory does not endorse the content or accuracy of any listing or external website.

While information is made available, no guarantee is given that the details provided are correct, complete or up-to-date.

wpSocket is not related to the theme or plugin, and also not responsible and expressly disclaims all liability for, damages of any kind, arising out of the use, reference to, or reliance on, any information or business listed throughout our site.

Keep Leading Your Followers!
Share it for them.