This plugin let’s you take advantage of the WebP image format with only a little effort. Install, configure, test, forget – and enjoy the increased performance of your website.
The plugin works by .htaccess magic coupled with an image converter. Basically, jpegs and pngs are routed to the image converter, unless the image converter has already converted the image. In that case, it is routed directly to the converted image. The images are saved in a subfolder to the “uploads” folder, preserving the same structure as the originals. In order to allow caching on CDN, the .htaccess rules add a “Vary” HTTP header when serving the WebP images.
The approach has the benefit that is works regardless of how an image found its way into your site. The plugin does not need to hook into Media Library events, Gallery events etc, because it does not need to maintain a complete collection of converted images. It makes it so much simpler — and lighter.
Note: The rules created in .htaccess are sensitive to the location of your image folder and the location of wordpress. If you at some point change one of these, the rules will have to be updated. .htaccess rules are updated whenever you change a setting (all configuration is actually stored in .htaccess, which allows the converter to run faster, than if it had the overhead of bootstrapping WordPress)
Note: Do not simply remove the plugin without deactivating it first. Deactivation takes care of removing the rules in the .htaccess file. With the rules there, but converter gone, your Google Chrome visitors will not see any jpeg images.
Note: The plugin has not been tested in multisite configurations. It’s on the roadmap!
- The plugin does not work on Microsoft IIS server
- The plugin has not been tested with multisite installation (it is on the roadmap!).
- The plugin has only been tested in WordPress 4.7.5 and above, but I expect it to work in other versions.
- The plugin has not been tested in all possible WordPress configurations. It has been tested in the following configurations: root install, subdir install, and subdir install with redirect from root (described as method 1 (here)[https://codex.wordpress.org/Giving_WordPress_Its_Own_Directory]).
- There might be compatability issues with other plugins. For example .htaccess rules from other plugins might interfere.
- Optionally provide conversion service for other sites
- Test on multisite
- Display whether the server is able to detect quality of jpegs or not
- Make the fallback quality configurable (the quality to use, when quality of source file cannot be determined)
No screenshots provided