Optimizing Images for SEO
6 min
Image optimization impacts both SEO (via Google Image Search and Core Web Vitals) and user experience. The four essential actions are: choosing the right format (WebP or AVIF), compressing without visible quality loss, filling in alt tags, and implementing lazy loading. These actions alone can reduce LCP by 20 to 40%.
Images represent on average 50 to 70% of a web page's weight. Poorly optimized, they drag down Core Web Vitals and hurt rankings. Well optimized, they open an additional traffic channel via Google Images.
Choosing the Right Image Format
WebP offers 25 to 35% better compression than JPEG for identical visual quality. AVIF goes even further, but its browser compatibility, while good in 2026, is worth checking for your audience.
Vector images (logos, icons, illustrations) should be in SVG: they are lightweight, scalable, and never degrade.
PNG remains relevant only for images requiring transparency or absolute quality without compression — rare cases in a standard web context.
- Photographs and complex visuals: WebP or AVIF.
- Logos, icons, illustrations: SVG.
- Screenshots with text: WebP with moderate compression (quality 80-85).
- Avoid animated GIFs: replace with a short MP4 video, 5 to 10 times lighter.
Compression and Appropriate Dimensions
An image 3,000 px wide displayed in an 800 px column transfers 3 to 4 times more data than necessary. Always resize before compressing.
Aim for under 100 KB for secondary images, less than 200 KB for hero images or main visuals. Beyond that, the impact on LCP becomes measurable.
Compressing and resizing images can reduce initial load time by 20 to 40% on unoptimized pages, with a direct impact on Core Web Vitals scores.
Industry studies 2025-2026 on web performance and SEO
Alt Tag, File Name, and Structured Data
The alt tag is the only text Google can associate with an image. It should describe the visual content precisely, naturally integrating the keyword if relevant, without forcing it.
The file name is secondary but useful: use keywords separated by hyphens (seo-image-optimization.webp) rather than IMG_4821.jpg.
For product images or key visuals, add ImageObject or Product structured data via Schema.org to increase visibility in Google Images and rich results.
Lazy Loading and Performance
Lazy loading loads images only when they enter the viewport. This reduces the initial page weight and improves the FCP (First Contentful Paint) score.
Important: never apply lazy loading to the hero or LCP image — Google and the browser must load it immediately. Use loading='eager' or omit the attribute for this priority image.
- Add loading='lazy' to all images outside the initial viewport.
- Explicitly define width and height attributes to avoid layout shifts (CLS).
- Use srcset to serve appropriate resolutions based on the user's screen.
FAQ
Is lazy loading natively supported by browsers?
Yes, since 2019 for Chrome and modern browsers, and since 2021 for Firefox. The loading='lazy' attribute is sufficient without an external JavaScript library for the majority of sites.
Does Google index WebP images?
Yes, Google supports and indexes WebP and AVIF images without issue. These formats are even recommended by Google's PageSpeed Insights guidelines to reduce page weight.
Does a missing alt tag penalize SEO?
It does not penalize directly, but it deprives Google of a context signal and excludes the image from Google Images indexing. On an e-commerce site or a content-heavy blog, missing alt tags represent a significant traffic loss.