📖 Note on the source: this article was produced based on concepts discussed in the post Image SEO: 12 Actionable Tips, originally published by Ahrefs. The content here has been rewritten, expanded, and adapted with examples, tools, and references.

A lot of people think image SEO is just putting a keyword in the alt attribute. In practice, there are at least twelve factors that influence how Google finds, understands, and ranks your site's images. Ignoring these factors means losing traffic that could easily be captured — including from Google Images, which accounts for a significant share of global searches.

Google itself keeps advancing machine-learning image recognition. But that doesn't make image SEO obsolete — on the contrary, Google keeps using every available signal (file name, alt text, page context, load speed) to accurately interpret and rank images.

1. Name files descriptively

The file name is one of the first signals Google uses to understand an image's subject. Cameras and phones generate generic names like IMG_0023.JPG or DSC_4817.jpg — which communicate absolutely nothing to the search engine.

Google itself states in its official guidelines that the file name is a clue about the image's content. The recommendation is simple: use descriptive keywords, separated by hyphens, without overdoing it:

Renaming images before uploading is a simple habit that makes a difference — especially for e-commerce sites, cooking blogs, portfolios, and any site that relies on traffic from image search.

2. Write useful alt text

The alt attribute describes an image to the browser. It's displayed when the image fails to load, read by screen readers for people with visual impairments, and used by Google to understand the page's visual content.

The syntax is simple:

<img src="dalmatian-puppy.jpg" alt="Dalmatian puppy playing in the park">

Google uses alt text alongside computer vision algorithms and the page's context to understand the image's subject. The guidance is to create useful, information-rich descriptions, using keywords contextually — never stacking words meaninglessly (keyword stuffing).

A shortcut that works well: complete the sentence "This is a photo of ___". The result, slightly adjusted, tends to make good alt text. Examples:

For product images, including the model number or SKU in the alt text can help you show up for specific technical searches. Don't forget captions either — Google extracts information about an image's subject from the text around it, including captions visible on the page.

3. Choose the right file format

The format you choose directly impacts file size — and, consequently, page load speed. The three most common formats on the web are JPG, PNG, and WebP, each with distinct characteristics:

FormatBest forTransparencyTypical size
JPGPhotographs, images with gradientsNoSmall to medium
PNGLogos, icons, screenshots with textYesMedium to large
WebPAny use on the modern webYes25–35% smaller than JPG/PNG
GIFSimple animationsPartialVariable
SVGLogos, icons, vector illustrationsYesVery small

The general rule: use JPG for photographs, PNG for images that need a transparent background and sharp text, and WebP whenever possible for the web — the format offers superior compression with equivalent quality. Use ImageTools' Image Converter to convert between formats before uploading.

4. Resize images to their actual display dimensions

Uploading a 4000px-wide photo to a site that displays images at 800px is a waste of bandwidth. The browser downloads the entire image and then discards the excess pixels — the user waits longer, with no visual benefit.

Identify the maximum display width for images in your layout (usually between 800px and 1440px, depending on the image type and site) and resize before uploading. To cover Retina (HiDPI) displays, use double the display width. Use ImageTools' Resize Image tool to precisely adjust dimensions.

Resize and compress your images now

Adjust dimensions and reduce your site's image weight for free, with no files sent to external servers.

Resize Compress

5. Compress images with no visible quality loss

Compression is the process of reducing a file's size without changing the image's dimensions. For JPG photos, reducing quality from 100% to 80% can shrink the file 5 to 10 times with an imperceptible difference on screen.

Load speed is a ranking factor confirmed by Google — on both desktop and mobile. Images are often the largest component of a web page's weight. Compressing every image before uploading is the technical SEO optimization with the best return for the effort.

Practical weight targets by image type:

Use ImageTools' Image Compressor to reduce JPG, PNG, and WebP directly in your browser — with nothing sent to external servers.

6. Create an image sitemap

An image sitemap tells Google about images it might not discover on its own — especially images loaded via JavaScript or embedded in complex galleries. Unlike a regular sitemap, an image sitemap can include URLs from other domains (like CDNs).

If your site uses WordPress with the Yoast SEO plugin, images are already automatically added to the sitemap. For custom sites, the image sitemap can be added manually following Google's official documentation. The main tags available are image:loc (the image URL), image:title, and image:caption.

7. Use structured data for product images

Google supports structured data (Schema.org) for images in several contexts — recipes, products, articles, events. When implemented correctly, this data allows images to appear in Google's rich results, with extra visual emphasis that increases click-through rate.

For e-commerce sites, product markup with an image is especially valuable: products with correctly marked-up images can appear in Google Shopping and in product cards in Google's knowledge panel.

8. Implement lazy loading

Lazy loading is the technique of loading images only when they're about to enter the visible screen area, instead of downloading them all at once on initial load. On pages with lots of images (long blog posts, product listings), lazy loading can reduce the page's initial weight by 60–80%.

The simplest implementation is native to HTML:

<img src="product.webp" alt="Blue sneakers" loading="lazy">

Important: never apply loading="lazy" to the main image above the fold (the first image visible without scrolling). This delays the LCP — Largest Contentful Paint, one of the Core Web Vitals metrics — and directly hurts ranking.

9. Set width and height on every image tag

When the browser doesn't know an image's size before loading it, it doesn't reserve the correct space in the layout — and when the image loads, the page's content "jumps." This phenomenon is what Google measures as CLS (Cumulative Layout Shift), another Core Web Vital.

The solution is to always declare width and height on image tags:

<img src="product.webp" alt="Blue sneakers" width="800" height="800" loading="lazy">

The values don't need to match the displayed visual size — they just define the aspect ratio so the browser reserves the correct space before the image loads.

10. Use responsive images with srcset

The srcset attribute lets you provide different versions of the same image for different screen sizes. The browser automatically chooses the most suitable version — serving a smaller image for phones and a larger one for desktops. On sites with heavy mobile traffic, this can reduce the volume of transferred data by 40–60%.

<img
  src="product-800.webp"
  srcset="product-400.webp 400w,
          product-800.webp 800w,
          product-1200.webp 1200w"
  sizes="(max-width: 600px) 400px, 800px"
  alt="Blue sneakers"
  width="800" height="800"
  loading="lazy"
>

11. Optimize the featured image for Open Graph and social media

When someone shares a URL on WhatsApp, Instagram, LinkedIn, or any other platform, the image shown in the preview comes from the Open Graph meta tags. If these tags aren't configured, the platform picks any image from the page — often with a poor result.

Always configure the og:image tag with a 1200×630px image on every important page of your site:

<meta property="og:image" content="https://seusite.com.br/imagens/artigo-preview.jpg">
<meta property="og:image:width" content="1200">
<meta property="og:image:height" content="630">

A well-built preview image — with legible title text, the brand's visual identity, and a relevant image — significantly increases the click-through rate on shares.

12. Consider the context of the entire page

Google doesn't evaluate images in isolation. It analyzes the whole picture: the text around the image, the page title, the semantic context, the other visual elements, the caption below the image, and even the anchor text of links pointing to the page. An image of a red shoe on a page about women's fashion has a completely different context than the same image on a cooking page.

Good context practices:

🔍 Quick audit: use Google Search Console to check which images on your site are being indexed. Go to Index → Pages and filter by "images" to see the indexing status and any issues.

Image SEO checklist

Frequently Asked Questions

Are alt text and caption the same thing?
No. Alt text is an HTML attribute invisible to the average user — it's only displayed when the image fails to load, and it's read by screen readers and Google. A caption is the visible text below the image on the page. The two are complementary and have different SEO impacts: alt text is direct about the image's subject; the caption adds narrative context and can help Google understand the relationship between the image and the surrounding content.
Do WebP images really improve ranking?
Indirectly, yes. WebP produces files 25–35% smaller than JPG and PNG with equivalent quality, which contributes to faster pages. Load speed is a ranking factor confirmed by Google, especially via Core Web Vitals (LCP). A lighter page loads faster, has a lower LCP, and that influences ranking. WebP on its own isn't a direct factor, but the performance impact is real.
Does Google Images generate relevant traffic?
It depends on the niche. For cooking, decor, fashion, physical product sites, and any category where people search for visual inspiration, Google Images can be a significant traffic source. For purely informational or B2B content, the impact is smaller. It's worth monitoring impression and click volume specifically from image search in Google Search Console.
Should I use the same alt text for repeated images on the site?
If the image is exactly the same and appears in the same context, the same alt text is acceptable. But if the same image appears in different contexts (for example, a product photo listed on the homepage and also on the product page), adapting the alt text to each page's context is better practice — and signals more context to Google.
How do I know if my site's images are well optimized?
Google PageSpeed Insights (pagespeed.web.dev) analyzes any URL and specifically lists image problems — incorrect sizing, lack of compression, outdated formats. Google Search Console also shows which images are being indexed and any errors. For a more complete audit, tools like Ahrefs Site Audit or Screaming Frog crawl the entire site and list images with missing alt text, excessive sizes, and other issues.