WebP and AVIF are modern image formats that make photos much smaller than JPEG or PNG for a similar look. Both handle transparency and animation, and current versions of Chrome, Edge, Firefox, Opera and Safari show both. AVIF usually makes the smaller file; WebP also works in older Safari versions, from Safari 14. MDN shows the safe pattern: AVIF first, WebP second and a JPEG fallback last, all in one <picture> element.
What are WebP and AVIF? #
They are file formats for pictures, like JPEG and PNG, but with better compression. MDN’s image format guide lists WebP as image/webp with the .webp extension, and AVIF as image/avif with .avif. Both can be lossy, which drops detail you will not notice, or lossless, which keeps every pixel. AVIF also supports HDR and wide colour, for pictures with stronger contrast and a bigger range of colours. Both are free to use: WebP needs no licence, and AVIF is royalty-free.
How much smaller are they? #
MDN gives the numbers:
| Format | Compared with | Typical saving (MDN) |
|---|---|---|
| Lossy WebP | JPEG of similar quality | 25 to 35% smaller on average |
| Lossless WebP | PNG | About 26% smaller |
| Lossy AVIF | JPEG of similar quality | Around 50% smaller |
Your own savings depend on the picture, so measure before and after. For screenshots, diagrams and line art, MDN suggests lossless encoding such as PNG.
Why does it matter for search? #
Pictures are often the heaviest part of a page, and smaller files load faster. That helps page speed and Largest Contentful Paint (LCP). web.dev says a good LCP is 2.5 seconds or less, measured at the 75th percentile of page loads. An <img> element is one of the element types LCP looks at, so on many pages the main photo is the LCP. Image weight is a technical SEO job as much as a design one. LCP is one of the Core Web Vitals. Google Search supports both formats: its image guide lists “BMP, GIF, JPEG, PNG, WebP, SVG, and AVIF”. See image SEO.
Why does it matter for AI answers? #
Multimodal AI tools read pictures as well as text, and AI crawlers fetch image files like any other request. A smaller file is quicker for every visitor, person or machine. What helps an AI tool understand a picture is the same as for Google: a real <img> element, a descriptive file name and good alt text. Google says it does not index CSS background images. An image sitemap, an extension of your XML sitemap, helps Google find pictures it might miss. The format makes the file smaller; it does not describe the picture.
How does the fallback work? #
MDN shows the pattern:
<picture>
<source srcset="photo.avif" type="image/avif" />
<source srcset="photo.webp" type="image/webp" />
<img src="photo.jpg" alt="photo" />
</picture>
The browser reads the sources in order. MDN says that if it does not support a source’s type, it skips that source, and if nothing matches it uses the <img> address. The <picture> element holds zero or more <source> elements, followed by one <img>. So order matters: put the smallest format first. Google’s image guide also advises always keeping an <img> with a src, because some crawlers do not support <picture> or srcset.
A worked example #
A bakery wants AVIF for its cake photos, with WebP and JPEG for older browsers. Its main photo is 800 by 600 pixels on screen, so it exports the photo at that size, not at the camera’s full width. It writes:
<picture>
<source srcset="lemon-drizzle-cake.avif" type="image/avif" />
<source srcset="lemon-drizzle-cake.webp" type="image/webp" />
<img src="lemon-drizzle-cake.jpg" width="800" height="600"
alt="Lemon drizzle cake on a wooden board" />
</picture>
The <img> carries the size and the alt text, so write real alt text there, not “photo”. MDN’s own example sets width and height on the <img> too. Google says alt text also helps people who use screen readers, which is part of web accessibility. Because this photo is the first thing people see, the bakery does not lazy-load it.
Which format, when? #
| Picture | First choice | Fallback |
|---|---|---|
| Photo on a page | AVIF | WebP, then JPEG |
| Picture with transparency | AVIF or WebP | PNG |
| Screenshot, diagram, line art | Lossless (PNG, or lossless WebP) | PNG |
| Short animation | Animated WebP or AVIF | GIF |
| Product picture in a Google feed | JPEG or WebP | PNG |
The last row matters for shops. Google’s Merchant Center product data specification accepts JPEG, WebP, PNG, non-animated GIF, BMP and TIFF for image_link. AVIF is not on that list. See Google Merchant Center, shopping feed and ecommerce SEO.
What are AVIF’s limits? #
AVIF is newer. MDN lists support from Chrome 85, Edge 121, Opera 71, Firefox 93 and Safari 16.1. Firefox shows animated AVIF from version 113. Because support “is not yet comprehensive”, MDN advises a fallback. AVIF also does not show progressively: MDN says files “must be fully downloaded before they can be displayed”. For small files that rarely matters. For very large pictures, it can. WebP on Safari for macOS needs Safari 14 or later and macOS Big Sur (11) or later.
Common mistakes #
- Converting a photo that is far wider in pixels than it is ever shown. A smaller format does not fix a picture that is four times too big. Chrome’s image delivery insight says pages should not serve images larger than the size they render at.
- Serving AVIF on its own. Older Safari versions cannot show it, so always keep a WebP or JPEG fallback.
- Changing the file name to
.webpwithout converting the file, so theContent-Typeand the real format no longer match. Google also recommends that file extensions match the actual file type. - Lazy-loading the main photo. web.dev says not to lazy-load images likely to be in the viewport when the page loads, especially LCP images. Use
loading="lazy"only further down. See lazy loading and above the fold. - Using CSS background images for pictures that matter. Google does not index CSS images.
- Forgetting to clear the cache after replacing images, so visitors still get the old files. See cache purge.
How to check it #
- Run the Image SEO Checker on a page. It looks at alt text, AVIF or WebP, sizes and licence.
- In Chrome DevTools, open the Network tab, filter by Img and read the Type and Size columns.
- Check the server’s HTTP
Content-Typeheader for an image, such asimage/webp. Our HTTP Header Checker shows it, and the Edge Cache Checker shows whether the image is served from the edge cache or your origin server, often through a CDN. - Make new files with the image converter, shrink them to the size they are shown with the image resizer, and compress them with the image compressor.
- Before you publish, read what a file carries with the image metadata viewer, and strip location data from photos with the EXIF remover.
- For AVIF, give a WebP or JPEG fallback with the
<picture>element, and keep an<img>with asrcfor crawlers. - Run Lighthouse in Chrome; its image delivery insight flags images with unnecessarily large download sizes. Work out what your LCP figures mean with the Core Web Vitals calculator. Our Page Speed Checker and real-user Core Web Vitals Checker are coming soon. See why your website is slow.
- For a whole page, run the SEO Checker. For shops, the Product Page Checker covers product images and product structured data, and the Product feed checker looks for merchant feed errors.
- Check the picture shown when a page is shared with the Open Graph checker.
- In URSY Pro, opening in stages: the image SEO audit covers alt text, sizes, formats and image sitemaps for every page, real-user speed shows Core Web Vitals from your own visitors, and the asset diet report lists scripts and styles each page type loads but never uses.
What URSY.com counts #
A request, in our counting, is one answer the website gave: a page, file, image, feed or API reply. We read requests from the CDN’s edge log, cache hits included, with the cache status of each. So you can see how often crawlers and people fetch your image files, and how many of those were served from cache. A bot fetching the same image 10 times counts as 10 requests. The rules are on our methodology page.
Questions #
Is AVIF better than WebP? #
AVIF usually makes smaller files: MDN puts lossy AVIF at around 50% smaller than JPEG, and lossy WebP at 25 to 35%. WebP works in older Safari versions, and AVIF does not show progressively. Serve both, AVIF first.
Does Google index WebP and AVIF images? #
Yes. Google’s image guide lists both among the supported formats.
Do I still need JPEG? #
Keep it as the fallback in the <img> element. MDN calls JPEG a good fallback for photographs.
Can I use AVIF in Google Merchant Center? #
Not as image_link. Google’s accepted list is JPEG, WebP, PNG, non-animated GIF, BMP and TIFF.
Will a smaller format fix a slow page? #
It helps if images are the heavy part. A picture that is far too wide, a lazy-loaded main photo or a slow time to first byte each need their own fix.
Related words #
- Largest Contentful Paint (LCP)
- Lazy loading
- Alt text
- Image SEO
- Core Web Vitals
- Page speed
- Cumulative Layout Shift
- HTML
- Speed topics
Sources #
- MDN: Image file type and format guide, checked 24 November 2026
- MDN: <picture>: The Picture element, last modified 1 October 2026, checked 24 November 2026
- Google Search Central: Google image SEO guide, checked 24 November 2026
- web.dev: Largest Contentful Paint (LCP), checked 24 November 2026
- web.dev: Browser-level image lazy loading, checked 24 November 2026
- Chrome for Developers: Improve image delivery, checked 24 November 2026
- Merchant Center Help: Product data specification, checked 24 November 2026
- URSY.com: How we count (methodology), checked 24 November 2026
Updated 24 November 2026 by URSY.com.
Cite this page: WebP and AVIF. URSY. Updated 26 November 2026. https://ursy.com/wiki/webp-and-avif/ · Section links
Tools for this
- LiveImage SEO Checkeralt text, AVIF/WebP, sizes and licence markupRun the check →
- LiveVerify an AI Botis it really GPTBot? IP, published lists and user agentRun the check →
- Livellms.txt Checker + Generatorcheck your llms.txt, or write llms.txt, llms-full.txt and llms.jsonRun the check →
- LiveAI Training Opt-Out Checker + Generatorwhat each AI may do with your site, and the exact lines to change itRun the check →
- LiveAI Consistency Checkerpage, schema, llms.txt and feeds state the same facts?Run the check →
- LiveGoogle Snippet Previewtitle and description length in pixels (in browser)Run the check →
- ProAI competitor gapPrompts where rivals appear and you don'tIn URSY Pro →
- ProAI fact accuracy monitorAI quoting your prices and facts wrong, with alertsIn URSY Pro →
- ProBrand facts (Truth Spine)Your official facts, each with proof, for AI to readIn URSY Pro →