PageSpeed Matters
    PageSpeed Matters
    Optimization Techniques · Glossary

    Image Optimization (WebP / AVIF / Responsive Images) · Definition & Explanation 2026

    Images are the largest contributor to page weight on the web — accounting for 50–75% of total bytes on most pages. The HTTP Archive reports the median mobile page transfers over 1MB of images. For e-commerce, media, and content-heavy sites, unoptimized images are the single most common cause of poor LCP and slow page loads.

    Image optimization is the comprehensive process of reducing image file sizes while maintaining acceptable visual quality, and delivering the right size image to each device. It encompasses four key areas: format selection (WebP, AVIF, JPEG, PNG), compression (lossy vs lossless), responsive delivery (srcset for device-appropriate sizing), and CDN-based transformation (automated format conversion and resizing).

    In 2026, the combination of AVIF format (50% smaller than JPEG), responsive images via srcset (40–60% mobile data reduction), and image CDNs (automatic format selection and resizing) means there is no excuse for unoptimized images. Yet we still find that 60% of sites we audit serve at least one image that's 5x larger than necessary.

    A single unoptimized hero image can be 3–5MB. Properly optimized, that same image is 50–200KB — a 10–25x reduction. This guide covers every aspect of image optimization: format selection, compression settings, responsive delivery, CDN workflows, and the critical relationship between images and LCP.

    Updated 2026-02-28
    M
    By Matt Suffoletto

    TL;DR — Quick Summary

    Image optimization involves choosing the right format (WebP 30% smaller than JPEG, AVIF 50% smaller), proper compression (80% lossy quality is visually lossless), responsive delivery via srcset (right-sized per device), and CDN-based transformation. Images are 50–75% of page weight. Optimizing them is usually the single highest-impact performance improvement available.

    What is Image Optimization (WebP / AVIF / Responsive Images)?

    Image optimization is the comprehensive process of reducing image file sizes while maintaining quality, and delivering the right size to each device. It encompasses:

    Format Selection:

    • AVIF — The most efficient modern format. Based on the AV1 video codec, AVIF achieves 50% smaller file sizes than JPEG and 20% smaller than WebP at equivalent quality. Supports transparency, animation, HDR, and wide color gamut. Slower to encode than WebP. Supported by Chrome, Firefox, and Safari (since 16.4).
    • WebP — Google's image format. 30% smaller than JPEG for lossy, 25% smaller than PNG for lossless. Supports transparency and animation. Fast encoding. Universal browser support since 2020.
    • JPEG — The legacy standard for photographs. Still widely used and well-optimized. Use as a fallback for the rare browser that doesn't support WebP/AVIF.
    • PNG — Lossless format for graphics, logos, screenshots with text. Use WebP lossless or AVIF lossless as modern alternatives. PNG is still appropriate for very small icons/sprites.
    • SVG — Vector format for icons, logos, illustrations. Infinitely scalable, tiny file sizes for simple graphics. Not suitable for photographs.

    Compression:

    • Lossy — Removes imperceptible visual data. 60–90% size reduction. Use for photographs and complex images. Quality settings: JPEG 80%, WebP 80%, AVIF 60–70% (AVIF quality scale differs).
    • Lossless — Preserves exact pixel-perfect quality. 10–30% size reduction. Use for graphics, logos, screenshots with text, and any image where artifacts are unacceptable.

    Responsive Images:

    • `srcset` attribute provides multiple image sources at different widths.
    • `sizes` attribute tells the browser how large the image will display at each viewport width.
    • Together, the browser selects the optimal image source without downloading extras.
    • A 2000px image on a 400px mobile screen wastes 75%+ of pixels. Responsive images eliminate this waste.

    CDN Delivery:

    • Image CDNs (Cloudinary, imgix, Cloudflare Images, Bunny Optimizer) automatically convert formats, resize, compress, and cache images on-the-fly based on the requesting device.
    • URL-based transformation: `image.jpg?w=800&format=avif&quality=80` — no build process needed.
    • Eliminates the need for manual image optimization workflows.

    WebP / AVIF / Responsive Images Thresholds

    MetricGoodNeeds ImprovementPoor
    JPEG quality75–85%85–95%> 95% or < 60%
    WebP quality75–85%85–95%> 95% or < 60%
    AVIF quality55–70%70–85%> 85% or < 40%
    Max image width≤ 2000px2000–3000px> 3000px

    Google evaluates the 75th percentile (p75) of real-user field data over a rolling 28-day window.

    History & Evolution

    Key milestones:

    • 1992 — JPEG format published (ISO 10918-1).
    • 2003 — PNG format achieves widespread adoption.
    • 2010 — WebP format announced by Google.
    • 2014 — srcset and sizes attributes standardized for responsive images.
    • 2018 — WebP support reaches all major browsers except Safari.
    • 2020 — Safari 14 adds WebP support. WebP becomes universally usable.
    • 2020 — AVIF format published (based on AV1 codec). Chrome adds support.
    • 2021 — Firefox adds AVIF support.
    • 2023 — Safari 16.4 adds AVIF support. AVIF becomes universally usable.
    • 2024 — JPEG XL abandoned by Chrome. AVIF confirmed as the future standard.
    • 2025–2026 — AVIF + WebP fallback is the standard practice. Image CDNs handle format selection automatically.

    How WebP / AVIF / Responsive Images is Measured

    Image optimization is measured by comparing image file sizes, formats, and delivery against best practices:

    Key metrics:

    • Total image weight (target: < 500KB for typical pages).
    • LCP image size (target: < 200KB for hero images).
    • Image format adoption (WebP/AVIF vs legacy JPEG/PNG).
    • Responsive image implementation (srcset coverage).

    Tools:

    • Lighthouse 'Serve images in next-gen formats' audit.
    • Lighthouse 'Properly size images' audit.
    • Lighthouse 'Efficiently encode images' audit.
    • Chrome DevTools Network panel (filter 'Img' to see all image transfers).
    • WebPageTest image analysis.
    • Squoosh.app for manual format/quality comparison.

    Key rule: Field data (CrUX) determines Google rankings. Lab data (Lighthouse, WebPageTest) is for debugging and iteration.

    Common Causes of Poor WebP / AVIF / Responsive Images Scores

    Common image optimization failures:

    1. 1Full-resolution uploads — Uploading 4000x3000px camera images directly to the CMS. These are 3–8MB and far larger than any display size on the page.
    2. 2Wrong format — Using PNG for photographs (3–5x larger than JPEG/WebP). Using JPEG for graphics with transparency (should be PNG or WebP).
    3. 3No WebP/AVIF conversion — Serving legacy JPEG/PNG when WebP saves 30% and AVIF saves 50%. Most sites still serve JPEG as the primary format.
    4. 4Missing responsive images — Serving a single 2000px image to all devices. A 400px mobile screen downloads 4x more pixels than needed.
    5. 5Missing width/height attributes — Images without dimensions cause CLS when they load (the container expands from 0 to the image's natural height).
    6. 6LCP image not prioritized — The hero image has no preload hint and no fetchpriority='high', competing with other resources for bandwidth.
    7. 7Over-compression — Quality set too low (< 60% JPEG) causing visible artifacts. Or quality too high (100%) with no perceptible benefit but 2–3x file size.
    8. 8No CDN delivery — Images served from the origin server without a CDN, adding 100–500ms of latency for distant users.

    Frequently Asked Questions

    For step-by-step optimization, platform-specific fixes, code examples, and case studies, read our full guide:

    The Ultimate Guide to Core Web Vitals: How to Pass All Metrics & Boost Rankings in 2026

    Struggling with WebP / AVIF / Responsive Images?

    Request a free speed audit and we'll identify exactly what's holding your scores back.