PHPackages                             ecomni/m2-webp - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [File &amp; Storage](/categories/file-storage)
4. /
5. ecomni/m2-webp

ActiveMagento2-module[File &amp; Storage](/categories/file-storage)

ecomni/m2-webp
==============

Ecomni Webp module to allow uploading webp files in Magento admin and automatically convert existing jpg/png images into webp.

1.4.0(1y ago)135OSL-3.0PHPPHP ^8.3

Since Dec 6Pushed 1y ago2 watchersCompare

[ Source](https://github.com/ecomni/m2-webp)[ Packagist](https://packagist.org/packages/ecomni/m2-webp)[ Docs](https://www.ecomni.nl)[ RSS](/packages/ecomni-m2-webp/feed)WikiDiscussions main Synced 1w ago

READMEChangelogDependencies (8)Versions (16)Used By (0)

Ecomni Webp module
==================

[](#ecomni-webp-module)

This module contains a package of composer patches for the Magento admin, to allow uploading and working with webp images.

It can also automatically update jpg/png images, by converting them and updating their references in the database. Anytime you use a jpg/png again, the cron will simply process it again. No worries or hassles for your content team!

This module is inspired on the [Webp2](https://github.com/yireo/Yireo_Webp2) module from [Yireo](https://www.yireo.nl/). If you already have Yireo\_Webp2 running, it's fine to keep it active until all images have been replaced. After that, you can disable it for increased performance.

Features
--------

[](#features)

- Upload webp images everywhere in the Magento admin.
- Cronjob that automatically converts and updates png/jpg images into webp.

By default, the cron starts every night at 01:00 am, kickstarting every content type at 5 minute intervals. The cron currently works for:

- Product gallery images
- Category images
- Pagebuilder background images in CMS Blocks &amp; Pages

How does the automatic conversion work?
---------------------------------------

[](#how-does-the-automatic-conversion-work)

### Products

[](#products)

The module grabs a batch of products with images still in non-webp format, using the `catalog_product_entity_media_gallery` table. The batch size per run is configurable, see the config section. The converter loops through the gallery entries of each product and generates a .webp images using `cwebp`. The original image is kept in place. It creates a new gallery entry and removes the old one if the creation is successful.

From now on, the product has webp images and the database references the webp variant directly, so no conversion or redirects are needed at runtime. If for any reason the product has a jpg/png image again in the future, the cron will simply process it again automatically.

### Categories

[](#categories)

Comparable to the product conversion, only this time we use the `catalog_category_entity_varchar` table to look for image attributes that can be converted. The category attribute is updated afterwards.

### CMS Pages &amp; Blocks

[](#cms-pages--blocks)

First we fetch blocks/pages that have 'jpg, jpeg or png' in their content. The HTML content is loaded into a DOMDocument object and queried for nodes with the `data-background-images` attribute. If these nodes contain a jpg/png image, the corresponding file is found &amp; converted. The node attribute gets updated with the new image path, and the block/page HTML is saved. This supports both the `desktop_background` and `mobile_background` attributes.

Configs
-------

[](#configs)

The module offers a few configs, in the `Ecomni/WebP` panel.

- `ecomni_webp/general/enabled` Enables the cron.
- `ecomni_webp/general/max_products_per_run` Cron batch size, default 50. (Only affects the product cron, other crons are not batched)
- `ecomni_webp/general/quality` Conversion quality used by cwebp, default 80. (Range: 1/100)

Note that the patches that allow you to save webp images in the admin are always active when you have this module installed. The config only controls the cronjobs.

Requirements
------------

[](#requirements)

This module is developed specifically on Magento 2.4.7-p5. Other versions could require small adjustments in the patches, feel free to make a pull-request for version-specific support. Your installation should have the `cwebp` package installed.

Installation
------------

[](#installation)

- Install using composer `composer require ecomni/m2-webp`
- Enable module: `bin/magento module:enable Ecomni_Webp`

###  Health Score

33

—

LowBetter than 72% of packages

Maintenance43

Moderate activity, may be stable

Popularity9

Limited adoption so far

Community4

Small or concentrated contributor base

Maturity62

Established project with proven stability

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~11 days

Recently: every ~24 days

Total

15

Last Release

458d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/23627606?v=4)[Ecomni](/maintainers/ecomni)[@ecomni](https://github.com/ecomni)

---

Tags

magento2magento2-extensionmagento2-modulewebp

### Embed Badge

![Health badge](/badges/ecomni-m2-webp/health.svg)

```
[![Health](https://phpackages.com/badges/ecomni-m2-webp/health.svg)](https://phpackages.com/packages/ecomni-m2-webp)
```

###  Alternatives

[run-as-root/magento2-prometheus-exporter

Magento2 Prometheus Exporter

69362.0k](/packages/run-as-root-magento2-prometheus-exporter)[mollie/magento2

Mollie Payment Module for Magento 2

1142.0M17](/packages/mollie-magento2)[mage-os/module-automatic-translation

Automatic AI content translation for Mage-OS.

3223.7k](/packages/mage-os-module-automatic-translation)[angeo/module-llms-txt

Magento 2 module for AI Engine Optimization (AEO). Generates spec-compliant llms.txt and llms-full.txt per llmstxt.org standard, plus streaming JSONL for vector indexing. Multi-store, multi-website, CLI, cron, async admin UI, Page Builder-aware sanitization, customer-group pricing, atomic writes, ETag/Cache-Control, .md mirrors.

132.2k](/packages/angeo-module-llms-txt)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
