SEO

Image SEO Guide: How to Optimize Images for Google

Properly optimized images can significantly improve your Google search rankings.

Why image SEO matters

Images affect your search rankings in two important ways. First, they are a significant part of page load time — and Google uses page speed as a ranking factor. Second, images can appear in Google Image Search, driving additional organic traffic to your site.

Most websites have poorly optimized images. Getting this right gives you a genuine advantage over competitors who haven't.

1. Use descriptive file names

Before uploading any image, rename the file to describe what it shows. Google reads file names to understand image content.

  • Bad: IMG_4821.jpg, screenshot001.png, image-1.webp
  • Good: webp-vs-png-comparison-chart.webp, red-leather-hiking-boots.webp, london-tower-bridge-sunset.webp

Use hyphens to separate words (not underscores). Keep names descriptive but concise — 3 to 5 words is ideal.

2. Write meaningful alt text

The alt attribute is the most important image SEO element. It tells Google what the image shows and is read aloud by screen readers for visually impaired users.

<!-- Bad -->
<img src="boots.webp" alt="image" />
<img src="boots.webp" alt="" />

<!-- Good -->
<img src="red-leather-hiking-boots.webp" 
     alt="Red leather hiking boots with waterproof lining" />

Write alt text as a natural description. Don't keyword-stuff — write for the visually impaired user, not the search engine.

3. Optimize file size and format

Google's Core Web Vitals include Largest Contentful Paint (LCP), which measures how fast your main image loads. Slow LCP directly reduces your search rankings.

  • Use WebP format — 25–35% smaller than JPG, 26% smaller than PNG
  • Compress to 80–85% quality for photos
  • Resize to display dimensions before uploading
  • Target under 200KB per image for most web images

Compress images free →   Convert to WebP free →

4. Set width and height attributes

Always include width and height on every image tag. This lets the browser reserve the correct space before the image loads, preventing layout shifts.

Layout shift is measured by Google's Cumulative Layout Shift (CLS) metric — another Core Web Vital that affects rankings. Every time an image loads and pushes content around, your CLS score gets worse.

<img src="photo.webp" alt="Description" 
     width="800" height="600" loading="lazy" />

5. Use lazy loading

Add loading="lazy" to all images that are below the fold (not visible on initial page load). This tells the browser to skip loading those images until the user scrolls toward them, reducing initial page load time.

Do not use lazy loading on your above-the-fold hero image or LCP image — these should load as fast as possible.

6. Use structured data for key images

For articles and product pages, including images in your JSON-LD structured data helps Google understand the image context and can improve how your content appears in search results.

7. Create an image sitemap

You can include image information in your sitemap.xml to help Google discover and index your images. This is especially useful for e-commerce sites with many product images.

Core Web Vitals image checklist

  • Hero/LCP image is WebP and under 200KB
  • Hero image is not lazy loaded
  • All below-fold images have loading="lazy"
  • All images have width and height attributes
  • All images have meaningful alt text
  • File names are descriptive
  • Images are resized to display dimensions

Optimize images free View all free tools