Snoika
SEO fundamentals·Supporting article

Image SEO guide: how to optimize images for search, step by step

Image SEO means helping search engines work out what an image shows and load it fast. Relevance fixes, such as file names and alt text, tell Google what the picture is and how it relates to the page. Speed fixes, such as compression and modern formats, keep the page light enough to rank. You need both, because a well-labeled image that loads slowly still drags the page down.

Portrait of Artem LozinskyArtem LozinskyOperations and product, Snoika · 7 min read
Five people in their twenties on an office rooftop terrace with a city skyline.

Image SEO levers that rank

The SEO levers that move rankings are the text around an image and the weight of the file. Google's image best practices page says it pulls information about an image "from the content of the page, including captions and image titles." So an image placed next to the paragraph it illustrates gets more context than the same image dropped into a sidebar.

Speed is the second lever. Images are the heaviest files on a page, so they decide a large share of load time and of Google's Core Web Vitals scores. A product page with 40 photos depends more on this lever than a blog post with one diagram.

What matters most depends on your site. If your images rank on their own in Google Images, as product shots and recipes do, relevance signals carry more weight. If your images only support the text, speed matters more. To see where you stand, run one important page through PageSpeed Insights and read every alt attribute in its source.

How to name image files

Name each file with a few lowercase words that describe what the image shows, separated by hyphens. Google's own example contrasts `my-new-black-kitten.jpg` with `IMG00023.JPG`. The descriptive name gives a crawler information about the subject before it reads a single pixel.

A file name is a weak signal on its own, but it costs nothing to get right and it travels with the image when other sites reuse it. Follow this order when you prepare a file:

  1. Describe the subject in plain words, the way a person would search for it.
  2. Add one distinguishing detail if it helps, such as color or model.
  3. Join the words with hyphens and drop filler like "image" or "final-v2".
  4. Make the extension match the real file type, which Google also asks for.

Rename files before upload. Changing the name of a file that's already indexed changes its URL, and Google then has to discover the image again.

Alt text that earns rankings

The best SEO alt text is a short, accurate description of what the image shows, written for someone who can't see it. Alt text is "the most important attribute" for image metadata, according to Google. It also warns that stuffing alt attributes with keywords "results in a negative user experience and may cause your site to be seen as spam." The 2025 Web Almanac found that 50% of images have empty alt text or descriptions under 10 characters, and about 8.5% of alt texts are just file names.

What good alt text describes

Write what the image shows in this page's context. On a recipe page, "sourdough loaf with an open crumb, sliced in half" works better than "bread". Your keyword belongs in the alt text only if it describes the image. If it doesn't, leave it out and let the on-page copy carry it.

When alt text should be empty

Decorative images, such as dividers and background textures, take an empty attribute: `alt=""`. Icons beside a text label take the same empty attribute. Screen readers skip them, and you don't waste a description on a flourish. Leave the attribute in place, though. Removing it entirely is an error.

How long alt text should be

Keep it to one sentence. Screen reader users hear every word, and a paragraph of alt text is a chore to sit through. Charts and diagrams are the exception: summarize the takeaway in the alt text and put the full data in the body copy or a caption.

Compression without quality loss

You can remove a large share of an image's file size with no change a reader would notice, provided you resize first and compress second. A 4,000-pixel photo shown in a 800-pixel column wastes most of its bytes before compression even starts. Export at the largest size the layout displays, then use `srcset` so phones get a smaller version.

Lossy compression throws away detail the eye barely registers and suits photos. Lossless compression keeps every pixel and suits screenshots and logos. It also suits anything with sharp text. Mix them up and you get either bloated photos or blurry interface shots.

Open the original and the compressed file side by side at 100% zoom to check edges and gradients, where artifacts show first. Check skin tones for early signs of artifacts as well. If you can't tell them apart, push compression one step further and compare again.

Structured data for images

Structured data gives Google facts about an image that it can't infer from the pixels, and it's the route into image rich results such as the Licensable badge. Google's image metadata documentation says the `license` property is required for that badge. That property is a URL pointing to the terms that govern the image's use. Google also recommends `acquireLicensePage`, which links to the page where someone can obtain the image.

You can supply the same facts as IPTC photo metadata embedded in the file instead of schema markup. The IPTC, the standards body behind that format, notes that embedded metadata stays with the image when it's republished elsewhere. It adds that Google displays "Creator" and "Copyright" only when they come from embedded IPTC data. The same requirement applies to "Credit".

A simpler way to gain richer results is to fill the `image` property in Product or Recipe schema with a crawlable, high-resolution URL, which makes the page eligible. The same approach works with the `image` property in Article schema. Test every template in Google's Rich Results Test before you roll it out.

Formats Google prefers

Google supports BMP and GIF as well as JPEG and PNG. It also supports WebP and AVIF. SVG is supported too, and Google gives all these formats equal ranking treatment. The format still matters, because it sets file size, and file size sets speed. Use WebP or AVIF for photos, with a JPEG or PNG fallback inside a `<picture>` element. Use SVG for logos and icons.

JPEG

Best for
Photos, universal fallback
File size
Baseline
Browser support
Universal

PNG

Best for
Screenshots, transparency
File size
Large for photos
Browser support
Universal

WebP

Best for
Photos and graphics
Browser support
About 95% of traffic

AVIF

Best for
Large hero photos
File size
40–50% smaller than JPEG
Browser support
About 93% of traffic

SVG

Best for
Logos, icons, line art
File size
Tiny for simple shapes
Browser support
Universal

The trade-off is encode time. AVIF compresses best but takes far longer to encode, which matters if you convert thousands of images on upload. Check what your content management system and image CDN can produce before you switch the whole library.

How AI reads your images

AI systems read your images in two ways: through the text around them and, more and more, through the pixels themselves. Google Lens handles nearly 20 billion visual searches a month, and Google says 20% of them are shopping-related. Lens matches what a camera sees against images on the web, so a clear, well-lit product photo on a page that names the product improves the odds of a match.

SEO writing still does most of the work for AI assistants. A crawler that fetches only the HTML never sees the picture, so the alt text and caption provide its description together with nearby copy. Write them so they'd make sense to someone who has only the words.

Read one key page with its images removed to check whether each image's subject is still clear to an assistant.

Lazy loading for speed

Lazy loading delays images below the fold until the reader scrolls near them, which cuts the initial page weight. Add `loading="lazy"` to those images and the browser handles the rest without a script.

Never lazy load the main image at the top of the page. That image is the Largest Contentful Paint (LCP) element, the measure Google uses for how fast the main content appears, and delaying it makes the score worse. Give it `fetchpriority="high"` instead.

Set `width` and `height` on every image as well. Without them the layout jumps as images arrive, which hurts Cumulative Layout Shift (CLS). Audit your templates because theme settings and plugins lazy load every image by default, the hero included.

Image sitemaps

An image sitemap lists the image URLs on each page so Google finds images it would otherwise miss. Google discovers most images through the `src` attribute of ordinary `img` tags, so a small site with standard markup gains little from one. It helps when images load through JavaScript or sit on a separate CDN domain. It also helps with images in galleries that crawlers struggle to reach.

You add an `image:image` entry with an `image:loc` URL under each page in your existing sitemap, or you build a separate file. Submit it in Search Console and watch the indexed image count. If that number stays far below the images you listed, the problem sits in the pages themselves, such as blocked CDN paths in robots.txt.

What to do next

Start with the template that carries your most valuable images, such as the product page or the article layout. One template fix updates every page built on it. Sites can fix alt text and lazy loading at template level in an afternoon, with time for the `<picture>` fallback as well. After that, track whether AI assistants describe your products and brand the way your pages do, because that shows whether your image SEO text is being read. Snoika audits websites and tracks brand visibility in Google and AI assistants. Check your AI visibility free to see where you stand.

FAQ

See how AI talks about your brand