๐Ÿ–ผ๏ธ Web Dev

WebP vs AVIF vs PNG vs SVG โ€” Image Formats Explained

๐Ÿ“… Jul 2, 2026 โฑ 4 min read

Images are usually 60โ€“80% of page weight. Choosing the right format is the single biggest performance lever you have.

The decision table

Serving modern formats safely

<picture>
  <source srcset="hero.avif" type="image/avif">
  <source srcset="hero.webp" type="image/webp">
  <img src="hero.jpg" alt="..." width="1200" height="600" loading="lazy">
</picture>

The browser takes the first format it supports; old browsers fall back to JPEG.

Free conversion tools

Rule of thumb: hero images under 200KB, thumbnails under 30KB.

โ† All Articles