Skip to content
SEO Medium severity

Image Optimization

What is image optimization and how does it affect page speed and rankings?

By eiSEO Team · Published Jun 15, 2025 · Updated Feb 27, 2026

What is image optimization?

Image optimization is the process of delivering images at the correct size, format, and compression level while providing proper HTML attributes (alt text, width, height, lazy loading). Unoptimized images are the number one cause of slow page loads on the web, directly impacting Core Web Vitals scores that Google uses as a ranking signal.

Image optimization is the process of delivering images at the correct size, format, and compression level while providing proper HTML attributes such as alt text, width, height, and lazy loading. Unoptimized images are the leading cause of slow page loads and directly impact Core Web Vitals scores used as a Google ranking signal.

Why does image optimization matter?

Images typically account for 50-70% of a page's total weight. Serving oversized or uncompressed images dramatically increases Largest Contentful Paint (LCP) times, which is a Core Web Vitals metric that directly affects search rankings. Missing width and height attributes cause layout shifts (high CLS), and missing alt text hurts both accessibility and image search visibility.

Key statistics

Images account for an average of 42% of a typical web page's total weight, making them the largest contributor to page load times.

Source: HTTP Archive

Pages that load within 2.5 seconds see a 25% higher conversion rate compared to pages loading in 5 seconds or more.

Source: Google Web Vitals

How to fix it

  1. 1

    Serve images in modern formats (WebP or AVIF) with JPEG/PNG fallbacks using the <picture> element or content negotiation.

  2. 2

    Always specify width and height attributes on <img> elements to prevent Cumulative Layout Shift (CLS) as images load.

  3. 3

    Add loading="lazy" to images below the fold so they load only when the user scrolls near them, improving initial page load time.

  4. 4

    Compress images to reduce file size without visible quality loss. Target under 200KB for hero images and under 100KB for standard content images.

  5. 5

    Use responsive images with srcset and sizes attributes to serve appropriately sized images for different viewport widths.

Code example

Bad
<img src="hero-photo.png">
<!-- No alt, no dimensions, no lazy loading, uncompressed PNG, will cause CLS and slow LCP -->
Good
<img
  src="hero-photo.webp"
  alt="Developer reviewing accessibility audit results on a dashboard"
  width="1200"
  height="630"
  loading="lazy"
  decoding="async"
>

Frequently asked questions

WebP offers the best balance of quality and compression for most use cases. AVIF provides even better compression but has less browser support. Use the <picture> element to serve modern formats with JPEG/PNG fallbacks.
Yes, indirectly. Large images slow down page load, increasing Largest Contentful Paint (LCP), which is a Core Web Vitals metric Google uses as a ranking factor.
Width and height attributes let the browser reserve space for the image before it loads, preventing layout shifts (CLS). Without them, the page content jumps around as images load, hurting user experience and Core Web Vitals.

Analyze your site's SEO health

eiSEO automatically detects and helps you fix issues like this across your entire site.