Quick Answer
To optimize images for SEO, use a modern format (WebP/AVIF), compress each image to the smallest file size at acceptable quality, and resize it to its display dimensions. Then write descriptive alt text and file names, and lazy-load images below the fold. These steps improve Core Web Vitals and help images rank in search.
Step 1: Choose the Right Format
Modern formats compress best:
- AVIF gives the smallest files and the best Core Web Vitals scores
- WebP compresses well and has broad browser support
- JPG is a safe fallback and suits photographs
- PNG is only for graphics that need transparency or sharp text
If you're not sure which format suits a particular image, use the format advisor.
Step 2: Compress Without Visible Quality Loss
Compress each image to the smallest file size that still looks right. For photographs, JPG or WebP quality 80-85 is a good balance. For graphics, use lossless compression. Aim for these targets:
- Hero images: under 200 KB
- Content images: under 100 KB
- Thumbnails: under 30 KB
Step 3: Resize to Display Dimensions
Never serve images larger than they appear on screen. Use responsive srcset attributes to serve a suitable size for each device. A common pattern is to create 3 sizes (small, medium, large) and let the browser choose.
Step 4: Write Descriptive Alt Text
Alt text makes images accessible to visually impaired users and gives search engines context. Write specific, descriptive alt text for every meaningful image. Purely decorative images should have an empty alt attribute.
Step 5: Use Descriptive File Names
Rename files from generic names like IMG_20240315.jpg to descriptive names like golden-retriever-park-frisbee.jpg. File names are a minor ranking signal and help Google understand what the image shows.
Step 6: Implement Lazy Loading
Add loading="lazy" to images below the fold. The browser then waits to load them until the user scrolls near them, which reduces the initial page weight and improves Largest Contentful Paint (LCP). Don't lazy-load images above the fold, because they should load immediately.
SEO Image Checklist
| Optimization | Impact | Effort |
|---|---|---|
| Convert to WebP/AVIF | High (file size) | Low |
| Compress at Q80-85 | High (file size) | Low |
| Resize to display size | High (file size) | Medium |
| Descriptive alt text | Medium (relevance) | Medium |
| Lazy loading | Medium (LCP) | Low |
| Descriptive file names | Low (ranking signal) | Low |
| Structured data (ImageObject) | Low (rich results) | Medium |
Try It Now
Optimize your images for SEO in your browser, with no software to install and no uploads to a server.