What Are Modern Image Formats (WebP & AVIF)? Complete Guide (2026)

Saar Twito9 min read
Saar Twito
Saar TwitoFounder & SEO Engineer

Hi, I'm Saar - a software engineer, SEO specialist, and lecturer who loves building tools and teaching tech.

View author profile →

What Are Modern Image Formats?

Modern image formats are next-generation file formats — primarily WebP and AVIF — that achieve significantly smaller file sizes than legacy JPEG, PNG, and GIF at equivalent visual quality. Performance audits flag any JPEG, PNG, or GIF where converting to WebP or AVIF would save more than ~8 KB. On image-heavy pages, that single change is often the largest single byte-weight win available.

Key Facts (TL;DR)

  • WebP savings: 25–35% smaller than JPEG at equivalent visual quality (Google WebP study). For lossless PNG conversion, WebP is roughly 25% smaller.
  • AVIF savings: ~50% smaller than JPEG and 20% smaller than WebP at equivalent quality (Alliance for Open Media benchmarks).
  • Audit threshold: Images are flagged when conversion would save more than ~8 KB.
  • Browser support (2026): WebP is available in 97%+ of browsers (everything since 2020). AVIF is in 95%+ (Safari 16+, Chrome 85+, Firefox 93+).
  • Page-weight impact: Images are 40–55% of total page weight on average (HTTP Archive Web Almanac, 2024). A 30% image reduction can shrink total page weight by 12–17%.
  • LCP correlation: Hero/feature images are the LCP element on roughly 70% of pages. Smaller hero files cut LCP directly.

Think of legacy formats as shipping a hardback book and modern formats as shipping the same content as a paperback — same story, half the weight, lower postage. The reader can't tell the difference, but everyone in the supply chain feels it.

Why Modern Image Formats Matter for Performance and SEO

Images are the single largest contributor to page weight on most sites — typically 40–55% of total bytes (HTTP Archive). That means image format choice has more leverage on perceived speed than almost any other optimization.

  • Faster LCP: The hero image is the Largest Contentful Paint element on most marketing and article pages. Cutting its file size 30–50% directly reduces LCP, which is a Core Web Vital and a Google ranking signal.
  • Lower total byte weight:Across a typical page, switching every JPEG to WebP saves 25–35% of image bytes. On a 3 MB page where 1.5 MB is images, that's ~450 KB shaved without touching code or copy.
  • Lower bandwidth costs: CDN egress and origin bandwidth are billed by the byte. A 30% image reduction means a 30% lower image-bandwidth bill on every request.
  • Better mobile experience: Mobile data plans and slow networks are where weight hurts most. Modern formats turn an unusable 4G page into a usable one.
  • AI search visibility: AI answer engines preferentially cite pages that already rank well, and Core Web Vitals feed those rankings. Heavy images that drag LCP into the red also drag down AI citation odds.

WebP vs AVIF vs JPEG vs PNG: A Worked Example

Consider a typical 1600×900 hero photograph saved at perceptually equivalent quality across formats. The same source pixels — wildly different bytes on the wire:

Source: hero-1600x900.png  (lossless reference)

JPEG  (q=80)   ->  220 KB     baseline
PNG-8 (paletted) -> 480 KB    +118%   (truecolor PNG would be ~1.6 MB)
WebP  (q=80)   ->  150 KB     -32%    vs JPEG
AVIF  (q=55)   ->  105 KB     -52%    vs JPEG, -30% vs WebP

Audit triggers when (legacy_size - modern_size) > 8 KB.
Every legacy image above 25 KB is essentially guaranteed to flag.

AVIF's extra compression comes from the AV1 video codec — better intra-frame prediction, more efficient entropy coding, and support for 10/12-bit color depth. WebP, derived from the VP8 video codec, sits between JPEG and AVIF on both efficiency and encode speed.

The 8 KB Threshold

The ~8 KB savings threshold exists because the conversion overhead (extra fallback markup, build-time CPU, multiple stored variants) only pays off when the per-image saving is meaningful. Tiny icons and 5 KB thumbnails are intentionally not flagged — the win isn't worth the engineering tax. Hero images, product photos, and inline article photography almost always clear the bar by 10×.

How to Check Which Images Need Conversion

Modern-format coverage is measured by performance audits as a list of specific URLs that would save more than ~8 KB if converted. Don't guess — pull the list and convert them in priority order.

  • Greadme's deep scan — surfaces every image flagged for modern-format conversion, ranked by potential byte savings, and pairs each with an AI-generated fix or one-click GitHub PR.
  • Greadme's crawler scan — runs the modern-format audit across every indexable URL, so you can find which templates (product, listing, article) leak the most bytes.
  • Greadme's AI visibility analyzer — checks whether image weight is dragging your LCP into a band that hurts both Google ranking and AI citation odds.
  • web.dev performance audits — the "Serve images in next-gen formats" opportunity lists every offending URL and the exact KB saving per file.
  • Chrome DevTools → Network panel — sort by Size, filter by Img, and you have your conversion backlog ranked by impact.

8 Proven Ways to Adopt Modern Image Formats

1. Use the <picture> Element with AVIF, WebP, and Fallback

The <picture> element is the standard pattern: list AVIF first, WebP second, JPEG/PNG as the universal fallback. The browser picks the first <source> it can decode.

<picture>
  <source srcset="hero.avif" type="image/avif" />
  <source srcset="hero.webp" type="image/webp" />
  <img
    src="hero.jpg"
    alt="Mountain sunrise"
    width="1600"
    height="900"
    loading="eager"
    fetchpriority="high"
  />
</picture>

Always keep width and height on the inner <img>— they're what the browser uses for layout reservation regardless of which source it picks.

2. Generate Variants at Build Time with sharp

For static and statically-built sites, generate AVIF + WebP + JPEG at build time. The sharp library (the engine behind most build pipelines and Next.js Image) produces all three in a single pass.

import sharp from 'sharp';

const input = sharp('hero.jpg');

await Promise.all([
  input.clone().avif({ quality: 55 }).toFile('hero.avif'),
  input.clone().webp({ quality: 80 }).toFile('hero.webp'),
  input.clone().jpeg({ quality: 80, mozjpeg: true }).toFile('hero.jpg'),
]);

3. Use Framework Image Components

Next.js <Image>, Nuxt <NuxtImg>, Astro <Image>, and Gatsby StaticImage all generate WebP/AVIF and emit a <picture> automatically. If you're already on one of these frameworks, switching <img> tags to the framework component fixes the audit globally.

4. Serve via an Image-Optimization Service

An image-optimization service (a CDN that transforms on the fly based on the Acceptheader) is the lowest-engineering path: upload one master JPEG, and the service returns AVIF to AVIF-capable clients, WebP to others, and the original as a final fallback. Useful when you can't change the build pipeline.

5. Pair Modern Formats with srcset for Responsive Sizes

Modern format alone doesn't solve serving a 1600 px hero to a 360 px phone. Combine the format switch with srcset so each device gets the right resolution and the right format.

<picture>
  <source
    type="image/avif"
    srcset="hero-480.avif 480w, hero-960.avif 960w, hero-1600.avif 1600w"
    sizes="(max-width: 600px) 100vw, 1600px"
  />
  <source
    type="image/webp"
    srcset="hero-480.webp 480w, hero-960.webp 960w, hero-1600.webp 1600w"
    sizes="(max-width: 600px) 100vw, 1600px"
  />
  <img
    src="hero-960.jpg"
    srcset="hero-480.jpg 480w, hero-960.jpg 960w, hero-1600.jpg 1600w"
    sizes="(max-width: 600px) 100vw, 1600px"
    alt="Mountain sunrise"
    width="1600"
    height="900"
  />
</picture>

6. Tune Quality, Don't Just Switch Format

AVIF at quality 55 is visually indistinguishable from JPEG at quality 90 for most photographic content. Default quality presets are usually conservative — drop AVIF to q=50–60 and WebP to q=75–82and re-eyeball the worst-case images. Don't leave a 50% saving on the table.

7. Don't Forget Background Images

CSS background-image doesn't use <picture>, so use image-set() to give the browser a format choice.

.hero {
  background-image: image-set(
    "hero.avif" type("image/avif"),
    "hero.webp" type("image/webp"),
    "hero.jpg"  type("image/jpeg")
  );
}

8. Regenerate Existing Image Libraries on Rebuild

Most sites have years of legacy image uploads. A one-time batch job that walks the asset folder and emits AVIF + WebP next to every JPEG/PNG fixes the entire backlog. Re-run it whenever new images land — wire it into the build, not a one-off script.

Common Modern-Format Pitfalls and Fixes

Problem: AVIF Files Are Larger Than WebP

What's happening: The encoder is at default settings, which are tuned for slow, high-quality encodes. AVIF is sensitive to encoder settings — bad presets can produce files larger than the JPEG.

Fix: Use quality: 50–60 and effort: 4–6 in sharp (or cqLevel in libavif). Validate by spot-checking 5 images: AVIF should beat WebP by ~20% at equivalent visual quality.

Problem: Browser Shows the JPEG Fallback Even Though It Supports WebP

What's happening: The <source> elements are missing the type attribute, or the source order is wrong. Without type, the browser falls through.

Fix: Every <source> needs type="image/avif" or type="image/webp". Order matters — most-efficient first (AVIF), then WebP, then the <img> fallback.

Problem: CMS Doesn't Accept WebP/AVIF Uploads

What's happening: Older CMS platforms whitelist a fixed set of MIME types and reject modern formats at upload time.

Fix: Don't upload modern formats — upload the original JPEG/PNG and convert at delivery time, either via a build-step transform or an image-optimization service. The CMS keeps the master, the CDN serves the modern variant.

Problem: Cached CDN Still Serves the Old Format After Conversion

What's happening: The CDN has the legacy URL cached and isn't respecting the Accept header for variant selection.

Fix: Either include the Accept header in the cache key (Vary: Accept) or use distinct URLs per format (hero.avif, hero.webp, hero.jpg). The latter is more cache-friendly.

Format Comparison: When to Use Each

FormatTypical Size vs JPEGBrowser Support (2026)Best Used For
AVIF~50% smaller~95% (Safari 16+, Chrome 85+, Firefox 93+)Hero photography, large product shots — anywhere bytes matter most
WebP25–35% smaller~97% (everything since 2020)Universal modern fallback; lossless replacement for PNG
JPEG (mozjpeg)baseline100%Final fallback inside <picture> for the long tail
PNG+50–200% larger100%Only when truly lossless and transparency are both required and WebP/AVIF aren't options
GIF+200–500% larger100%Avoid — replace with animated WebP, AVIF, or an MP4/WebM video
SVGn/a (vector)100%Logos, icons, illustrations — any image that's drawn rather than photographed

FAQ

Should I use WebP or AVIF?

Use both, with <picture>. Browsers that support AVIF (~95% as of 2026) will pick it for the largest savings; the rest fall back to WebP (~97% support); the long-tail 2–3% get JPEG. You don't pick one — you serve the best one each browser can handle.

Is WebP actually safe to use without a JPEG fallback?

For most consumer audiences, yes — WebP support is at 97%+ in 2026. But the <picture> + JPEG fallback adds almost no engineering cost and protects the long tail (older devices, niche browsers, embedded webviews). Keep the fallback.

Will modern image formats hurt SEO or image search rankings?

No. Google indexes WebP and AVIF directly and has done so for years. The performance gains (lower LCP, lower page weight) actually help rankings via Core Web Vitals. Make sure alt text and surrounding context still describe the image clearly.

What about animated GIFs — should I convert those too?

Yes, urgently. Animated GIFs are typically 5–10× larger than the equivalent animated WebP, and 10–20× larger than an MP4 or WebM video at equivalent quality. For anything over a few seconds, use <video autoplay muted loop playsinline> with an MP4/WebM source.

Do I need to keep the original JPEG/PNG masters?

Yes. Always keep the lossless or highest-quality original — re-encoding from a lossy WebP/AVIF compounds compression artifacts. The master JPEG/PNG (or ideally the source RAW/PSD) is the input to every future format you might generate.

Do AI search engines like ChatGPT and Perplexity care about image formats?

Not directly — they cite text. But AI answer engines disproportionately cite pages that rank well in traditional search, and Core Web Vitals (especially LCP, which is image-driven on most pages) feed those rankings. Heavy images hurt LCP, which hurts rank, which hurts your citation odds in AI Overviews and Perplexity. The chain is real even if it's indirect.

How much disk and CDN storage do multi-format variants cost?

Roughly 1.5–1.8× the original storage when you keep AVIF + WebP + JPEG variants. That's usually trivial compared to the bandwidth saved on every request — most sites recoup the storage cost within their first month of bandwidth bills.

Conclusion

Modern image formats are the highest-leverage performance fix on most sites — a single change that cuts 25–50% of image bytes, directly improves LCP, lowers bandwidth bills, and feeds every Core Web Vital that matters for ranking. The 8 KB audit threshold means the win is real on every flagged image; you're not chasing rounding errors.

The pattern is settled: <picture> with AVIF, WebP, and a JPEG fallback, plus srcset for responsive sizing. Build it once into your image pipeline (or your framework's image component) and every future upload inherits the optimization for free. Run a Greadme deep scan to get the exact list of images to convert first, ranked by byte savings.