WebP & AVIF Images in Magento 2: The Page-Speed Win
WebP and AVIF in Magento 2: the easiest page-speed win most stores skip
Product imagery is usually the heaviest thing on a Magento page, and most catalogues still serve JPG/PNG originals. WebP typically cuts image weight by 25–35% at the same visual quality; AVIF often goes further. Smaller images mean faster LCP — the Core Web Vital most stores fail — and Magento 2 still doesn't convert images natively.
What “doing it right” involves
- Convert on upload and on demand — new images become WebP/AVIF automatically; the existing catalogue gets converted in bulk, not by hand.
- Serve with fallback — browsers that can't take AVIF get WebP; anything older gets the original. No broken images.
- Resize to what's displayed — a 2000px original in a 400px grid slot wastes most of its bytes; responsive sizes matter as much as format.
- Lazy-load below the fold — but never the LCP hero image, which should load eagerly (and ideally be preloaded).
How Image Optimisation does it
Our Image Optimisation for Magento 2 module handles the pipeline: automatic WebP and AVIF conversion with quality controls, compression and resizing of uploads, bulk conversion of the existing catalogue, and lazy loading with sensible defaults so the hero stays eager. It works on Luma; on a headless build the optimised variants are what your frontend serves.
Images are one of the seven levers we walk through in Why Your Magento Store Is Slow (and the 7 Fixes That Work) — worth reading if speed is the wider goal.
Frequently asked questions
Does Magento 2 support WebP natively?
Magento can display WebP files you upload, but it doesn't convert your catalogue to WebP/AVIF or serve format-based fallbacks — that's what a module adds.
Will converting break my existing product images?
No — originals are kept and modern formats are served alongside with fallback, so unsupported browsers still get the original.
How much faster will my pages be?
It depends how image-heavy they are: category grids and PDPs with large galleries see the biggest LCP gains. Verified on Magento Open Source 2.4.9, PHP 8.4 and 8.5.
Image Optimisation is a one-off purchase — no subscription — and is included in the AgenticEcom Suite.
