Image SEO Guide
How to optimize images so search engines can find, understand, and rank your content.
Quick Answer
Image SEO requires: descriptive file names, meaningful alt text, compressed file sizes, modern formats (WebP/AVIF), proper dimensions, lazy loading, and structured data. These factors together improve search visibility, page speed, and accessibility.
Key Points
- File names: Use descriptive, hyphen-separated names (e.g.,
red-running-shoes.jpgnotIMG_2024.jpg) - Alt text: Describe the image content accurately for screen readers and search engines
- Format: Use WebP for 25-35% smaller files than JPG at equivalent quality
- Compression: Target quality 80-90% for imperceptible quality loss
- Dimensions: Serve images at the exact display size, not larger
- Lazy loading: Use
loading="lazy"for below-the-fold images - Structured data: Add ImageObject schema for important images
File Naming
Search engines use file names to understand image content. Descriptive names help both SEO and accessibility.
| ❌ Bad | ✅ Good | Why |
|---|---|---|
IMG_20240115.jpg | red-running-shoes.jpg | Descriptive of content |
photo1.png | mountain-sunset-landscape.png | Describes the scene |
banner_final_v3.jpg | summer-sale-banner.jpg | Purpose is clear |
Alt Text
Alt text serves two purposes: accessibility for screen readers and context for search engines.
Good Alt Text Examples
alt="Red Nike running shoes on white background"— descriptive, specificalt="Chart showing 40% increase in web traffic"— describes dataalt="Team meeting in conference room"— describes scene
Bad Alt Text Examples
alt="image"— too vaguealt="shoes shoes red shoes buy shoes"— keyword stuffingalt=""— empty (only for decorative images)
Format Optimization
Choosing the right format directly impacts page speed, which is a ranking factor.
| Format | Best For | SEO Impact |
|---|---|---|
| WebP | Web photos, graphics | 25-35% smaller than JPG → faster LCP |
| AVIF | Maximum compression | 50%+ smaller than JPG → best LCP |
| JPG | Universal compatibility | Widest support, good baseline |
| PNG | Transparency, sharp edges | Lossless, larger files |
Core Web Vitals Impact
Images directly affect all three Core Web Vitals metrics that Google uses for ranking.
LCP (Largest Contentful Paint)
The largest image or text element. Optimize hero images with modern formats, compression, and preloading.
CLS (Cumulative Layout Shift)
Always set width and height attributes on images to prevent layout shifts during loading.
INP (Interaction to Next Paint)
Heavy image processing can block the main thread. Use Web Workers for client-side processing.
Lazy Loading
Native lazy loading is supported by all modern browsers and requires no JavaScript.
<img
src="photo.webp"
alt="Mountain landscape"
width="800"
height="600"
loading="lazy"
decoding="async"
/> Do NOT lazy load above-the-fold images (hero, first visible image). These should load immediately for best LCP.