How to Optimize Images for SEO
Boost your search rankings with properly optimized images and best practices.
Image SEO is often overlooked, but optimized images can drive significant traffic through Google Image Search and improve your overall page rankings. Here's everything you need to know.
Why Image SEO Matters
- Google Image Search drives billions of searches monthly
- Core Web Vitals heavily depend on image optimization
- Rich results often feature images prominently
- User engagement increases with quality images
The Complete Image SEO Checklist
1. Use Descriptive File Names
Before uploading, rename your files with descriptive, keyword-rich names:
Bad: IMG_2847.jpg
Good: blue-nike-running-shoes.jpg
Tips for file names:
- Use lowercase letters
- Separate words with hyphens (not underscores)
- Include relevant keywords naturally
- Keep it concise but descriptive
2. Write Effective Alt Text
Alt text helps search engines understand your images and improves accessibility:
Bad: alt="image"
Better: alt="shoes"
Best: alt="Blue Nike Air Max running shoes on white background"
Alt text guidelines:
- Describe the image accurately
- Include your target keyword if natural
- Keep it under 125 characters
- Don't start with "Image of..." or "Picture of..."
- Be specific and contextual
3. Optimize File Size
Page speed is a ranking factor. Compress your images to improve load times:
- Use WebP format (25-35% smaller than JPEG)
- Compress to 70-80% quality
- Aim for under 100 KB for most web images
- Use fatpng to compress without quality loss
4. Choose the Right Dimensions
Don't rely on CSS to resize images. Upload them at the correct display size:
- Match the actual display dimensions
- Use responsive images with srcset
- Avoid scaling up small images
5. Implement Responsive Images
Use the HTML picture element or srcset attribute to serve different image sizes for different screen widths. This ensures mobile users download smaller images while desktop users get high-resolution versions.
Key attributes to use:
- srcset: Define multiple image sources with their widths (e.g., 400w, 800w, 1200w)
- sizes: Tell the browser which image to load based on viewport width
- width/height: Always include dimensions to prevent layout shift
6. Add Width and Height Attributes
Always include width and height attributes on your img tags to prevent Cumulative Layout Shift (CLS). For example, if your image is 800 pixels wide and 600 pixels tall, include width="800" and height="600" in the tag.
7. Use Lazy Loading
Add loading="lazy" to images below the fold. This defers loading until the user scrolls near them, improving initial page load time. Don't lazy load above-the-fold images (like hero images) - they should load immediately.
8. Create an Image Sitemap
Help Google discover your images by including them in your sitemap. Add image:image elements within your URL entries, specifying the image location and title. This helps search engines index your images more effectively.
9. Use Structured Data
Add schema markup for products, articles, and recipes to enable rich results in search. Include an "image" property in your JSON-LD structured data to associate images with your content. This can help your images appear in Google's rich results and image carousels.
10. Consider Image CDN
Use a CDN to serve images faster globally:
- Cloudflare
- Cloudinary
- imgix
Technical SEO for Images
Format Selection
| Use Case | Recommended Format |
|---|---|
| Photographs | WebP (JPEG fallback) |
| Graphics/logos | SVG or PNG |
| Animations | WebP or MP4 |
| Icons | SVG |
Core Web Vitals Impact
- LCP (Largest Contentful Paint): Often your hero image - optimize it heavily
- CLS (Cumulative Layout Shift): Always specify dimensions
- FID (First Input Delay): Large images can block the main thread
Common Image SEO Mistakes
- Missing alt text - Every image needs descriptive alt text
- Generic file names - "image1.jpg" tells Google nothing
- Oversized images - Don't upload 5000px images for 500px displays
- Keyword stuffing - Don't cram keywords into alt text unnaturally
- Missing dimensions - Causes layout shifts that hurt rankings
- Blocking with robots.txt - Don't block /images/ from crawling
Measuring Success
Track your image SEO performance:
- Google Search Console - Check the Performance report with "Search Type: Image"
- PageSpeed Insights - Monitor Core Web Vitals
- Google Analytics - Track traffic from image search
Conclusion
Image SEO is a combination of technical optimization and good content practices. Compress your images, write descriptive alt text, use proper file names, and implement responsive images. These steps will improve both your search rankings and user experience.
Related Resources
Ready to compress your images?
Try SmallBytes for free - no sign up required. Your files never leave your browser.
Start Compressing