WebP for Magento

WebP for Magento

  • Smaller images
  • Less bandwidth
  • Faster webshops

WebP is an image-format - developed by Google - aimed to reduce the size of images dramatically. While still in development, WebP-images already allow you to reduce the size of JPG or PNG images. Unfortunately, the WebP image-format is at this moment only supported by a small number of browsers.

Cost Free
Current version 1.0.2 (Stable)
Requirements Magento CE 1.7 - 1.9
Magento EE 1.10 - 1.14
PHP 5.4.0 or higher
Download Download
Support Support Forum
License OSL (Open Software License)

Getting started

  • Setup the WebP binaries on your server
  • Install this Magento module (see download page for instructions)

Overview

This extension integrates WebP into Magento, and adds WebP images to the page if the browser supports it. Browser support for WebP is detected based on a simple user-agent check (Chrome browser) and an additional JavaScript detection. If WebP is detected, the extension will parse the HTML-output of the Magento root-block to make sure links to supported images (png, jpg, jpeg) are actually replaced with WebP images. 

Getting the WebP support in your server

For using this extension, you will need to install WebP support on your server. Either upgrade PHP to version 5.5 or higher and make sure the ImageMagick module has webp support built into it. Or download the cwebp binary from the Google WebP project and install that binary on your server:

https://developers.google.com/speed/webp/download

Configuring the binary in the System Configuration

If your PHP environment does not list WebP as being supported (a simple phpinfo() will tell you whether this is the case or not), or if you don't whether it is being supported, the binary solution is the right way to go for. Once the binary is installed in your environment and you have verified its workings via SSH, you can configure the path to the binary in the Magento System Configuration under Web > Webp images. The binary path that you will configure usually is something like this:

/usr/local/bin/cwebp

Configuration options

All configuration options for this module can be found in the System Configuration under Web and then Webp images. The options allow you to enable the 2 WebP conversion methods. If you suspect that one method fails, disable it and see if the other one works.

Demo

You can see a demo of the WebP extension for Magento by visiting the Yireo demo-site http://magento1.yireo-demo.com/ with a WebP-enabled browser. Currently the Chrome browser supports WebP out of the box, while for Firefox there is a WebP plugin available.

Frequently Asked Questions

Which Webp method do you recommend to use?

The binary method. The PHP GD support for WebP is quite new, depends on your specific PHP version and it sometimes does not work. By using the WebP binaries from Google instead, you will be able to use the latest WebP technology with the latest bugfixes.

After installing WebP, some of the images are blank

For each image, the WebP extension tries to convert the original image to a WebP alternative. This might fail if there are unsupported features in the image (animated GIFs, certain alpha-transparencies). Our recommendation is to use the latest WebP binaries as conversion method, instead of PHP GD.

Should I manually upload the WebP variants of all my images?

You can, but that's not a must. This extension will try to convert your current images, by using either the cwebp binary or the PHP GD library. If both fail, or the result is not as you want it to be, you can still try to convert your images to WebP manually (with whatever tool you can find) and upload the WebP images to your application folders. This extension will simply check whether a WebP alternative exists in the same folder as the original image. Note that the extension will also compare time stamps.

More extensions

Google Recaptcha

Google Recaptcha

Distinguish between human and robot Protect all your frontend forms
WebP for Magento

WebP for Magento

Implement WebP into Magento Serve smaller images
Google Tag Manager

Google Tag Manager

Add GTM to Magento Centrally manage all Google stuff