The Home for Magento 2 Excellence

Quality-tested Magento 2 modules. Explore. Evaluate. Elevate. #magento2

1070 Modules
573 Ready
491 Need Help
๐Ÿ† Leaderboard
Actively Maintained v1.4.0

ETechFlow Image Optimizer for Magento 2

etechflow/module-image-optimizer

Converts catalog JPEG and PNG images to WebP server-side with no external API or per-image fees, serving optimized <picture> variants automatically on product and category pages and processing newly cached images via cron.

1
Downloads
Below average
0
GitHub Stars
Today
Last Release
0
Open Issues
Build Issues
0/3 checks passed

Build Tests

Composer Install
โ€“ DI Compile
โ€“ Templates

Code Quality

CS Coding Standard
โ€“ PHPStan

Tested on Magento 2.4.9

Recent Test History

Each release is tested against the latest Magento version at that time.

v1.4.0 on Magento 2.4.9
Jun 2, 2026
v1.3.1 on Magento 2.4.9
Jun 1, 2026

Looking for Contributors

Composer installation fails. Your contribution could help the entire Magento community!

Contribute

Share This Module's Status

ETechFlow Image Optimizer for Magento 2 Magento compatibility status badge

README

Loaded from GitHub

ETechFlow Image Optimizer

Server-side WebP image optimization for Magento 2. No external API, no per-image fees, no rate limits.

Install

composer require etechflow/module-image-optimizer:^1.0
bin/magento module:enable ETechFlow_ImageOptimizer
bin/magento setup:upgrade
bin/magento setup:di:compile
bin/magento cache:flush
# Restart php-fpm to clear OPcache (mandatory on prod with opcache.validate_timestamps=0)

Activate the licence

php tools/generate-license.php --module=image-optimizer --host=<your-domain>

Paste into Stores โ†’ Configuration โ†’ eTechFlow โ†’ Image Optimizer โ†’ License Key (or use the Bundle License Key if you're an ETechFlow suite customer).

Verify

bin/magento etechflow:io:verify

Twelve PASS lines means you're good to go.

Run the first bulk optimization

bin/magento etechflow:io:optimize

Walks pub/media/catalog/product/cache/, converts every JPEG/PNG to WebP. Resumable, idempotent, dedupes already-converted images.

After this finishes once, the <picture> block plugin starts emitting WebP variants automatically on every PDP / category page. New images cached by Magento are picked up on the next cron tick (every 5 min).

How it works

Three pieces:

  1. Conversion engine chain โ€” tries cwebp binary first (fastest), then ImageMagick PHP extension, then PHP-GD. First available wins. No external API.
  2. Per-image <picture> block โ€” when Magento renders <img src="x.jpg">, our plugin wraps it: <picture><source srcset="x.webp" type="image/webp"><img src="x.jpg" loading="lazy"></picture>. WebP-capable browsers grab the smaller file; the rest get the JPEG. Universal compatibility.
  3. Bulk + cron CLI โ€” convert existing inventory once, then trust the cron to keep up with new images.

Configuration

Stores โ†’ Configuration โ†’ eTechFlow โ†’ Image Optimizer:

  • License Key โ€” per-module key (or use Bundle License Key for the suite)
  • Module Enabled โ€” toggle the whole feature
  • Quality โ€” 1-100, default 80. Higher = larger files, marginal quality gain past ~85.
  • Conversion engine order โ€” pick which engines to try and in what order. Default: cwebp โ†’ Imagick โ†’ GD.
  • Image coverage โ€” which images to optimize: product catalog, search, cross-sells, CMS images, sliders.
  • Bulk batch size โ€” how many images per cron tick (default 200).

Honest caveats

  • Requires PHP-GD with WebP support OR Imagick with WebP support OR cwebp binary installed. Most modern hosts have at least one. Run etechflow:io:verify to confirm.
  • Doubles the size of pub/media/catalog/product/cache/ (JPEG + WebP coexist). Plan disk space accordingly โ€” typically +25-40% growth.
  • After the first bulk run, your CDN cache needs a purge to start serving the new HTML with <picture> tags.

Compatibility

  • Magento Open Source 2.4.4 โ€“ 2.4.8
  • Adobe Commerce 2.4.4 โ€“ 2.4.8
  • PHP 8.1 / 8.2 / 8.3 / 8.4
  • Hyvรค Theme + Hyvรค Checkout
  • Luma theme

Support

info@etechflow.com โ€” include your license key + Magento version when reporting issues.

This content is fetched directly from the module's GitHub repository. We are not the authors of this content and take no responsibility for its accuracy, completeness, or any consequences arising from its use.