WebP & AVIF
Updated
Also known as: WebP, AVIF, modern image formats, next-gen image formats
WebP (from Google, 2010) and AVIF (from AOMedia, 2019) are modern image formats that deliver files 25–50 % smaller than classic JPEGs/PNGs at comparable visual quality. Both support lossy and lossless compression, transparency and animation. WebP has enjoyed universal support for years (all modern browsers including Safari from 14, iOS from 14), while AVIF reaches fully universal support from 2024. For page speed and Core Web Vitals they are essential — anyone still serving JPEG/PNG for compressible images is giving away 30–50 % of file size.
WebP vs AVIF — making the choice
- WebP — the solid standard. 25–34 % smaller than JPEG at the same quality, universal browser support, fast encoding times. The recommendation for most websites.
- AVIF — the best compression. 30–50 % smaller than JPEG, sometimes with better visual quality at a small file size. Encoding is considerably slower than WebP, which slows down automatic generation pipelines.
- Picture element fallback — best practice:
<picture>with an AVIF source, a WebP source and a JPEG fallback. The browser selects the most modern format it supports.
WebP/AVIF in the CMS workflow
- WordPress — native support for WebP since 6.1, AVIF from 6.5.
- Shopify — automatic WebP conversion via the CDN pipeline.
- Custom CMS — automatic conversion on upload using ImageMagick, cwebp or libavif.
- CDN-based conversion — Cloudflare Polish, Fastly Image Optimizer, bunny.net auto-WebP. Often simpler than conversion within the CMS.
When NOT to use WebP/AVIF
- SVG content — vector graphics should remain SVG rather than being converted to bitmap.
- Logos and icons — when small and simple, SVG is often the better option.
- Print applications — fine for the website, but PNG/JPEG remain preferable for PDF downloads.
- Very old browser compatibility — if the target audience uses IE11 or Android 4.x, WebP/AVIF are problematic (though in that case there are likely other problems to solve).
Example from practice
Example: An online shop with 12,000 products had all product images as JPEG (on average 280 KB per image). Conversion to WebP via Cloudflare Polish: an average of 142 KB per image (49 % saving). Effect: initial LCP fell from 3.8 s to 2.1 s (reaching the Good threshold). The conversion rate rose measurably by 6.4 % over the following 8 weeks. A classic page speed quick win with a direct business effect — image quality was unchanged to the human eye.
Frequently asked questions
What are WebP and AVIF?
Should you use WebP or AVIF?
<picture> element you can serve AVIF primarily, WebP as a fallback and JPEG as the final fallback level.How do you convert images to WebP/AVIF?
Do WebP/AVIF bring SEO benefits?
Used in rankmio for
Image hints from Google PageSpeed
Free SEO & GEO Check
SEO score, AI visibility and citation readiness of your website in 30 seconds — no registration required.
Ready to optimize your website?
Register for free, get 10 credits and start right away.
Register now