A lightweight module for OpenMage / Magento 1 that replaces .jpg and .png images with .webp.
Magento 2 version available at https://github.com/kudja/magento2-webp
- Supports both HTML and JSON responses (e.g. AJAX, product data, etc.)
- Converts on-demand: new image paths are queued and processed via cron
- Lightweight output rewriting with minimal performance impact
- Compatible with FPC, custom themes and extensions
- JS fallback for browsers without WebP support (WebP support chart)
- Conversion modes:
- Local conversion using
cwebp - Tinify (tinypng.com) API
- Local conversion using
Composer (recommended)
composer require kudja/openmage-tinifyFrom git
composer config repositories.openmage-tinify vcs https://github.com/kudja/openmage-tinify.git
composer require kudja/openmage-tinifyVia modman
modman clone https://github.com/kudja/openmage-tinify.gitManual way:
Download zip and extract src folder to the magento root.
For local conversion you need to install cwebp binary.
You can use apt-get or brew to install it.
Ubuntu/Debian
sudo apt install webpIf you are using tinify api you need to install tinify library.
composer require tinify/tinifyIn Magento admin go to System > Configuration > Kudja > Tinify (WebP) section.