Image Optimisation for Magento 2 — WebP, AVIF & Lazy Loading

SKU: AGENTIC-IMAGEOPTIMISATION
In Stock

Image Optimisation generates WebP and, where supported, AVIF files beside Magento catalogue images. Run a catalogue scan and process the pending queue by cron or CLI, or enable generation when Magento resolves a product image URL. Optional settings downscale JPEG/PNG uploads and add native lazy loading after the first configured number of HTML images. The module does not switch storefront image URLs to its generated files; serve those files through a separately configured theme or image delivery layer. The current 1.0.1 buyer package has a confirmed CLI reporting failure on PHP 8.5 with the GD fallback; check release status before using that runtime.

Perpetual licence — one payment. The version you buy is yours to keep and use for as long as you like, with 12 months of updates and priority support included. When the year ends your store carries on running exactly as it is — only updates and support stop. Renewal is optional and never billed automatically. A further 12 months paid before expiry or within 30 days afterward is 40% off the current list price. Contact us with your order number to arrange it.

Secure checkout

Generate modern image files for a Magento catalogue

Image Optimisation can create WebP and, where supported by the installed image library, AVIF siblings for JPEG, PNG and GIF sources. It keeps the original image and records generated file size and status in an Admin image log. Imagick is used when available; GD is the fallback. AVIF is off by default.

Choose when generation runs

  • CLI: bin/magento agenticecom:image:scan registers existing catalogue gallery images as pending; bin/magento agenticecom:image:optimize --pending-only processes them. Use --batch-size=N to limit a pending run. Without --pending-only, the CLI walks supported images under Magento's media directory.
  • Cron: processes up to 50 pending records every five minutes when Magento cron runs.
  • Product image URL resolution: optional page-load mode generates missing siblings synchronously beside the original and resized cache files. Cron-only or CLI-only modes avoid that work in this hook.

Delivery requires integration: the product-image hook returns the original URL. The package does not emit a

Optional image handling

An upload hook can downscale oversized JPEG/PNG files when enabled; it changes the saved upload and is off by default. A response hook can add loading="lazy" to HTML images after the first configured count, excluding configured CSS classes; it is also off by default. Image order in HTML is not a guaranteed measure of the visual LCP element.

The generator checks source MIME type, size (30 MB), side length (12,000 px) and pixel count (50 million) before decoding, and sets Imagick resource limits. Those safeguards need malformed-file and host-specific qualification before production use. Generated file size may vary or exceed the original; the log records observed size rather than a promised saving.

CMS and retina controls exist in configuration but have no corresponding generation or delivery path in this buyer release. Check release-specific Magento/PHP compatibility and image-library support before deployment.

Known 1.0.1 PHP 8.5/GD limitation

The 1.0.1 buyer package has a confirmed PHP 8.5 issue on its GD fallback: the CLI can write a WebP file but report an error because deprecated GD cleanup raises a Magento exception. A corrected QA candidate exists but is not a buyer release. Check the published package version and runtime qualification before deploying on PHP 8.5.

Frequently asked questions

Does this convert images I have already uploaded?

The scan command registers existing catalogue gallery images for pending processing. Cron or the CLI can then generate enabled formats. The CLI optimisation command without --pending-only walks the media directory.

Will browsers automatically receive WebP or AVIF?

No. This package writes alternate files but returns the original Magento image URL. A theme or image delivery layer must select and serve the alternates.

Will conversion affect a shopper request?

Page-load generation is synchronous when enabled and a requested product image has no generated sibling. Use cron or CLI processing to move bulk work away from page rendering.

Are CMS and retina images included?

The package contains CMS and retina configuration fields, but no corresponding generation or delivery path. The pending scan covers catalogue gallery images.

Which Magento and PHP versions are supported?

Check the exact release's package requirements and tested Magento/PHP pair before installation.