Skip to content

Image Optimisation

Images are usually the heaviest thing on a product page. Image Optimisation shrinks them: it generates modern WebP/AVIF versions of your catalogue images (typically 25–40% smaller), lazy-loads below-the-fold images while leaving your hero/LCP image eager, and tracks every conversion with its size saving — so pages get lighter and Core Web Vitals improve, with nothing to do per image.

Manage Images dashboard

Magento

Open Source 2.4.9 GA (and later 2.4.x).

PHP

Tested on 8.4 and 8.5.

Engine

Imagick when available, GD fallback.

Formats

WebP / AVIF, generated on demand or by cron.

Generates WebP/AVIF copies of catalogue images at a quality you set. The smaller format is served to browsers that support it, falling back to the original elsewhere — typically a 25–40% byte reduction with no visible quality loss.

  1. On demand — the first time an image is requested, its WebP/AVIF version is generated and cached (then served from cache thereafter).

  2. In bulkScan All Product Images finds everything that isn’t optimised yet, and Optimize Pending Images (or the cron) processes the backlog. The same two steps are available on the CLI: bin/magento agenticecom:image:scan then bin/magento agenticecom:image:optimize --pending-only (optionally --batch-size=200).

  3. The result is logged with its size saving, and the dashboard shows your running total.

Will lazy loading hurt my hero image / LCP?

No. The first N images on a page (your above-the-fold hero) are left eager — only below-the-fold images get loading="lazy". You can also exclude images by CSS class, so a slider or banner you want loaded immediately stays eager.

Do I have to convert every image manually?

No — images are converted on first request and cached, and you can bulk-process the whole catalogue with Scan + Optimize Pending (or let the cron do it). The dashboard tracks what’s done and what’s pending.

What if my server doesn’t have ImageMagick?

It falls back to PHP’s GD extension for WebP generation. Imagick is preferred (cleaner output, no libpng warnings) but isn’t required.

Is it safe to point it at user-supplied images?

Yes — every source is type- and size-validated before decoding (real JPEG/PNG/GIF, capped bytes, dimensions and pixel count), which blocks decompression-bomb attacks, and Imagick runs with hard resource limits. Verified clean on PHP 8.4 and 8.5.