Overview

This document provides developer documentation for the WebP Optimized Images Extension for Magento 2 by Jajuma. The extension enables automatic conversion and delivery of WebP images to optimize performance and reduce bandwidth usage in Magento 2 stores.


Table of Contents


Features

  • Automatic conversion of images to WebP format
  • Seamless integration with Magento 2 media gallery
  • Fallback to original image formats for unsupported browsers
  • Configurable quality and conversion settings
  • CLI commands for bulk conversion and cache clearing

Installation

Install via Composer:

composer require jajuma/magento2-webp
bin/magento module:enable Jajuma_WebpImages
bin/magento setup:upgrade
bin/magento cache:flush

Or clone the repository:

git clone https://github.com/jajuma/magento2-webp.git
cd magento2-webp
composer install
bin/magento module:enable Jajuma_WebpImages
bin/magento setup:upgrade

Usage

Once installed and enabled, the extension automatically converts and serves images in WebP format where supported.

To manually convert images via CLI:

bin/magento jajuma:webp:convert

To clear generated WebP images:

bin/magento jajuma:webp:clear

Configuration

Configure the extension in the Magento Admin Panel:

Stores > Configuration > Jajuma > WebP Images

Option Type Default Description
Enable WebP bool Yes Enable or disable WebP image delivery
Quality int 85 Set WebP image quality (0-100)
Convert on the Fly bool Yes Convert images as they are requested
Fallback to Original bool Yes Serve original format if WebP unsupported

FAQ

Q: What happens if a browser does not support WebP?
A: The extension automatically serves the original image format as a fallback.

Q: Can I convert all images at once?
A: Yes, use the CLI command bin/magento jajuma:webp:convert to bulk convert images.


Changelog

  • v1.0.0 — Initial release.

See Also


License

MIT License


Finden Sie alles, was Sie wissen müssen, und weitere wertvolle Einblicke in Magento und Hyvä:
Fachmännisch kuratiert von JaJuMa:

🚀 Starten Sie in das JaJuMa Hyväverse

Ihre zentrale Ressource für alles rund um Hyvä.

Erkunden Sie die Magento Metropolis!

Ihre zentrale Ressource für alles rund um Magento.



Did you find the products you are looking for?