Yireo - Trainings & extensions

Open main menu

Magento 1 Extension

Webp

Implement WebP into Magento and serve smaller images

  • 100% open source and well-written
  • compliant with modern Magento standards
  • Free with no strings attached
  • Community collaboration via GitHub
FREE

Latest release: See CHANGELOG

Background

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.

Quick Start to install your Yireo extension

Installation via composer URL

We recommend to install Magento 1 extensions via composer. See the Composer project for instructions on how to get composer up and running. Once composer is installed, use the following command to install our extension.

composer require yireo/magento1-webp

After this, the extension is ready for use in Magento. First of all, flush the cache. This can be either done using the Cache Management page in the Magento Admin Panel, or by using the command magerun cache:flush. If you were already logged into the Magento Admin Panel, make sure to logout and log back in again, before proceeding. Do not forget to grab yourself a manual copy of our extension as a backup.

Manual installation

Please note that we highly recommend using composer instead. However, in some cases, it might be required to do a non-composer installation. For this, download the module ZIP from our site (under the tab File Downloads). Next, create a folder with the following name and copy to the ZIP contents to it:

app/etc/modules/Yireo/Webp.xml
app/code/community/Yireo/Webp

After this, the extension is ready for use in Magento. First of all, flush the cache. This can be either done using the Cache Management page in the Magento Admin Panel, or by using the command magerun cache:flush. If you were already logged into the Magento Admin Panel, make sure to logout and log back in again, before proceeding. Do not forget to grab yourself a manual copy of our extension as a backup.

Downloads

Head over to the GitHub repository for downloads: https://github.com/yireo/Yireo_Webp

Frequently Asked Questions

No, it is not. As a policy, all our Yireo software is unencrypted - we do not make use of technologies like ionCube or ZendOptimizer. All PHP-code is open source, but for commercial extensions the code is only given to paying customers.

You probably would like to know if this extension is working under a specific Magento version 2.X.Y. However, from a technical point of view, the question is wrong: The major Magento version 2.X.Y is not semantical but instead used for marketing purposes. It doesn't give any guarantees.

Instead, we maintain compatibility with the actual modules that lie underneath (like Magento_Catalog or the Magento Framework). And version management for these dependencies is handled via composer. We strongly advice you to rely on composer to answer the question whether our extension works under a specific Magento version. This is the only way to guarantee compatibility in a professional way.

Alternatively, study our CHANGELOG for details on the progress we made.

This extension is offered for free. Feel free to go the GitHub repository (see the link under Quick Start> Downloads) and open an Issue there. Please note that this is a voluntary open source project. The more helpful you are in describing the issue at hand, the more likely volunteers can come in to help you with the issue.

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.

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.

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.

Getting support

If you run into problems, we are happy to help you out with the following resources:

We usually respond within 24 hours.

Supported Magento versions

  • 1.9.4.0 (see composer requirements)

Requirement details

  • php: >=7.0.0
ExtDN

We are a proud member of ExtDN

ExtDN forms a network of Magento extension developers, that strive for a better extension quality - both on a technical level and from an end-users point of view. With industry leaders like Fooman and aHeadworks, ExtDN lifts up the Magento extension space to a new level. And Yireo is proud to be part of this.

Maybe our newsletter is something for you?

This will be the most interesting spam you've ever read

We don't write too commercial stuff, we focus on the technology (which we love) and we regularly come up with innovative solutions. Via our newsletter, you can keep yourself up to date on all of this coolness. Subscribing only takes seconds.

Sign up in a few seconds

Proud member of

  Latest blog

Extensions

Legal information

Other Yireo sites

Get Social

About Yireo