Magento
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.

Compatibility
Section titled “Compatibility”PHP
Engine
Formats
What it does
Section titled “What it does”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.
Adds loading="lazy" to below-the-fold <img> tags — but skips the first N images (your
hero / LCP) and any CSS classes you exclude, so lazy loading speeds up the page without
hurting the Largest Contentful Paint.
The Manage Images dashboard logs every image: original vs optimised size, compression %, how it was generated (page load / cron / CLI), status and total bytes saved.
How images get optimised
Section titled “How images get optimised”-
On demand — the first time an image is requested, its WebP/AVIF version is generated and cached (then served from cache thereafter).
-
In bulk — Scan 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:scanthenbin/magento agenticecom:image:optimize --pending-only(optionally--batch-size=200). -
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.