Skip to content

This guide answers: how to optimise your website’s images for search, step by step

How to optimise your website’s images for search, step by step

Learn how to optimise images for search: resize, compress, name files, write alt text, handle lazy loading and place images next to relevant text.

By Hannah Wells, Technical SEO, site performance and online stores
· 7 min read

updated 

How to optimise your website’s images for search, step by step
FIG. 01 Photo Vagaro / Unsplash

Short answer

To optimise images for search, resize each file to the size the layout actually displays, compress it (under 100 KB for inline images), give it a descriptive lowercase filename, write a plain alt text of at most 125 characters, and keep above-the-fold images out of lazy loading. Then place each image next to the text that explains it. The steps below follow that order.

Key points

  1. Google cannot "see" an image the way a visitor does.
  2. Google has said that it uses the filename as a clue to what an image is about.
  3. Start with the format. WebP continues to be one of the best choices for web performance, and AVIF gives the smallest files.
  4. The benchmark to aim for is under 100 KB for inline images.

Why image optimization matters for both classic and AI search

Google cannot “see” an image the way a visitor does. It reads clues around the picture: the filename, the alt text, the text on the page and, where present, structured data. If those clues are missing or vague, the image has little to work with.

Images also affect the page itself. A heavy hero image slows the loading of the main content, and that ties directly to Core Web Vitals. The sources reviewed for this guide (consulted on 03/12/2026) also point out that images matter for visibility in AI search engines, which depend on the same text signals to understand what a picture shows.

So image work serves three things at once: Google Images, general page performance, and how clearly your content can be interpreted by machines. None of this is a trick. It is mostly careful description and sensible file handling.

What Google reads around an image
  • Filename: a clue to the subject matter
  • Alt text: the main text signal for the image itself
  • Surrounding text: the page content next to the image
  • Structured data: extra context that can make a page eligible for rich results

Google’s core signals for understanding images

Google has said that it uses the filename as a clue to what an image is about. Its image publishing guidelines, as cited by Riff Analytics, suggest lowercase letters, hyphens between words, and a descriptive name. They also warn against stuffing keywords into the name.

Alt text is the next signal. The sources consulted describe it as the single most impactful image SEO signal, and they note that Google warns against keyword stuffing in alt attributes. Stuffed alt text looks spammy and helps nobody, least of all the people who rely on it.

The third signal is the text around the image. The fourth is structured data.

What no one can give you is a weighting. Google does not publish how much each signal counts, so any claim of the form “this signal is worth this much” should be treated with suspicion.

Step 1: choose your image format and size

Start with the format. WebP continues to be one of the best choices for web performance, and AVIF gives the smallest files. JPG remains the usual choice for photographs, and PNG suits graphics that need transparency. If your platform supports WebP or AVIF, those should be your default for new images.

Then fix the dimensions. Never serve an image larger than the space it is shown in. Resize it to the maximum size the layout actually displays. A file that is 2400 pixels wide, placed in a container that is 800 pixels wide, forces every visitor to download pixels that are never shown. That is wasted bandwidth, and it makes the page slower for no visible gain.

Width served versus width displayed
Image file: 2400 pixels wide
Container on the page: 800 pixels wide

The displayed width is only a third of the file width. The rest is wasted bandwidth.

Step 2: compress and optimize file size

The benchmark to aim for is under 100 KB for inline images. This is the figure cited in the sources as Google’s benchmark for most web content. A hero image can go higher, up to roughly 300 KB, because it is the largest visual on the page and carries more detail.

The principle is simple: remove data the eye will not miss. Compression reduces file weight, a lighter file loads faster, and faster loading supports Core Web Vitals. That is an indirect route to better performance, not a direct promise of better rankings. Whatever tool you use to compress, check the result with your own eyes. If a photo looks muddy or banded, you have gone too far.

Weight targets
Under 100 KBInline images
About 300 KBUpper limit for a hero image
125 charactersMaximum for alt text

Step 3: write effective alt text

Alt text exists first for people who cannot see the image, such as screen reader users or visitors whose images fail to load. It also helps Google understand the picture. Both purposes point to the same advice: describe what is in the image.

Keep it to a maximum of 125 characters and start the description immediately. Skip openers like “image of” or “picture of”, which use up space without adding information. Do not describe what the image should rank for. Describe what it shows.

Here are examples for a photo of a puppy on a lawn:

  • Good: “Golden retriever puppy lying on a lawn”. It is short, specific and starts with the subject.
  • Acceptable, with context: “Golden retriever puppy chewing a rope toy in a garden”. It adds action and setting without padding.
  • Bad: “dog dog food best dog food cheap buy dog food online”. It is keyword stuffing, it reads as spam, and it tells a screen reader user nothing about the photo.

The same logic applies to filenames. A name such as golden-retriever-puppy-on-lawn.webp tells Google and humans what the file is. A name made of random characters tells them nothing.

Step 4: set up lazy loading correctly

Lazy loading delays the loading of an image until the visitor is about to need it. It is useful for images far down the page, because the browser does not spend effort on pictures nobody has scrolled to yet.

The critical rule is to never lazy-load images above the fold. The hero image and anything else visible on first load must start loading immediately, or you delay the Largest Contentful Paint. For the hero image, remove loading=”lazy” and add fetchpriority=”high”. For offscreen images, keep lazy loading in place.

This is one of the most common mistakes: a site applies lazy loading to every image by default, including the one that should appear first.

Step 5: place images near relevant text

Google does not judge an image only by the file itself. The content around it counts as context. An image dropped into a page at random gives Google little to go on, and it gives visitors little reason to care.

Place each image next to the paragraph or heading that explains it. If a step in a guide needs a screenshot, put the screenshot at that step. This helps ranking signals, and it also makes the page easier to read, which is the real test of whether the image belongs.

Step 6: use consistent image URLs across your site

If the same image appears on several pages, reference it from the same URL every time. Google caches images by URL, so a single address lets it reuse what it already holds. Copies of the same picture under different addresses waste crawl budget and cancel the caching benefit.

In practice, this means uploading a shared image once, such as a logo or a recurring diagram, and pointing every page to that one location.

Remember: your page title shows in Google Images

Unlike alt text, the page title is what appears as the headline when your image shows up in Google Images results. So the title of the page, not the alt attribute, drives much of the click-through from image search. This is often overlooked. A clear, accurate title on the page that hosts the image deserves as much attention as the image file itself.

What nobody can tell you for certain

Some questions have no published answer, and it is better to say so than to guess:

  • The exact ranking weight of each signal. Google does not publish it.
  • Whether alt text improves classic search rankings beyond accessibility and image search.
  • The minimum image dimensions Google requires.
  • The effect of watermarks on image SEO.
  • Whether AI-generated images are treated differently.
  • Specific differences between mobile and desktop image optimization.
  • The separate impact of image captions versus alt text.
  • Whether image loading speed correlates with ranking beyond Core Web Vitals.

Treat these as open questions. Optimise for clarity and speed, keep your descriptions honest, and do not expect any single change to guarantee a position in Google Images or anywhere else.

Sources consulted on 03/12/2026

  • Pixeto, Image SEO best practices
  • Search Counsel, Image SEO in 2026: how to optimize images for Google
  • Riff Analytics, SEO for Google Images
  • ImageSEO, How to optimize images for SEO
How to optimise your website's images for search, step by st en chiffresTarget file size for inline imagesunder 100KBMaximum alt text length125charactersMaximum file size for hero images~300KB

Read next in Technical SEO

seo-service-journal technical-seo

How Google crawls a website: crawl budget, crawl rate and what slows it down

· 8 min read

seo-service-journal technical-seo

Indexing explained: why a page is crawled but not indexed

· 8 min read

seo-service-journal technical-seo

Robots.txt: syntax, common mistakes and how to test it

· 6 min read

Free newsletter · every Monday

The Monday Crawl

One email each Monday: what changed in the official search documentation, and what to check on your own site.

Free. One click to unsubscribe. We use your email only to send the newsletter. Privacy policy.