Skip to content

Image SEO: File Names, WebP vs AVIF, Lazy Loading and Lens

Image SEO is everything that helps search engines find, understand and quickly load your pictures: real img elements on crawlable pages, short descriptive file names, WebP or AVIF files sized to fit their slot, lazy loading below the fold only, and an image sitemap for files Google can't reach on its own.

By , founder of Slibur

14 min read

Image SEO: File Names, WebP vs AVIF, Lazy Loading and Lens
In this article

Alt text belongs on that list too, and it has a page of its own: the image alt text guide covers what Google and WCAG ask for. This one covers everything else, from the name you give a file to what an AI model actually sees when it opens a photo.

Pictures now reach people through three doors. Google Images is the familiar one. Google Lens starts from the camera, and Google said in February 2025 that Lens handles more than 20 billion visual searches every month. AI assistants are the third door, and they answer in text, quoting pages rather than showing pictures. To find out whether ChatGPT, Google AI Overviews, Claude, Perplexity and Grok mention your brand at all, Slibur's AI search optimization tool tracks those five assistants.

How Google finds and reads an image

Google can only rank an image it has found, fetched and tied to a page. Its image best practices (opens in a new tab), last updated March 2, 2026, put discovery first, and three rules there decide whether a picture gets indexed at all.

  • Use a real image element. Google finds images in the src attribute of an img element, even when it sits inside a picture element. It doesn't index CSS images, so a hero banner set with background-image never reaches Google Images.
  • Keep a plain src as the fallback. Some browsers and crawlers don't understand srcset or the picture element, so Google recommends always giving a fallback URL in src.
  • Use one URL per image. When the same file appears on many pages, reference it with the same URL everywhere. Google says this lets it cache and reuse the image instead of requesting it again, which matters on large sites that watch their crawl budget.

Meaning comes next. Google works out what an image shows from the page around it, captions and image titles included, and asks for images to sit near relevant text on pages about the same subject. A product shot lost in a generic gallery tells Google far less than the same shot placed next to the product's name and description.

Formats Google Search supports

Seven formats are supported: BMP, GIF, JPEG, PNG, WebP, SVG and AVIF. Google also asks that the file extension match the real file type, so a WebP saved as photo.jpg is worth correcting. Inline data URIs are allowed, but Google warns that they can considerably increase the size of the page.

How to name image files for SEO

Google says a file name gives "very light clues" about what an image shows. Light is the operative word. A good name won't rescue a weak page, yet Google still prefers my-new-black-kitten.jpg to IMG00023.JPG and tells you to avoid generic names such as image1.jpg or pic.gif. Six rules cover almost every case:

  1. Describe what is in the picture. Name the subject first, then the detail that sets this photo apart from the next one: walnut-dining-table-extended.jpg, then walnut-dining-table-leaf-detail.jpg.
  2. Separate words with hyphens. Google's URL guidelines recommend hyphens over underscores, because a hyphen clearly marks a word boundary while underscores are often used to join words, as in a function name like format_date.
  3. Keep it short. Google's own wording is "short, but descriptive". A handful of meaningful words is enough, so drop filler such as photo, final or v2.
  4. Write it in lowercase. URL paths can be case-sensitive, so Table.JPG and table.jpg may point to different files. One lowercase rule avoids broken references.
  5. Translate names on localized pages. Google asks you to translate file names along with the page, following its URL encoding rules for non-Latin characters.
  6. Automate large catalogs. For sites with thousands of images, Google suggests automating the naming. A template fed by product data gives every file a unique, readable name.

Some patterns that work:

ImagePatternExample
Product photobrand, product, color, viewacme-trail-runner-olive-side.webp
How-to steptask, step numbersourdough-shaping-step-3.jpg
Tutorial screenshottool, screen, what it showssearch-console-image-filter.png
Local business photoservice, placeroof-repair-austin-tx.jpg
Charttopic, chart type, periodorganic-clicks-line-chart-2026.png

File names help Google, not every machine that looks at your images: a vision model never sees the name you chose, as the section on AI models below shows. A model number, a place or a product name that matters has to appear in the page text as well.

Renaming images that are already live

A new file name is a new URL. Rename published images only when the old names are truly meaningless, and update every page, sitemap and product feed that points to them in the same release. On a big site, it usually pays to apply the rule to new uploads first, then to images on the pages that already earn traffic.

WebP, AVIF or JPEG: choosing a format

Format is one of the biggest levers on image weight. MDN's image format guide (opens in a new tab) puts numbers on it: lossy WebP files are on average 25 to 35% smaller than JPEGs of similar quality, lossless WebP is typically 26% smaller than the same PNG, and lossy AVIF comes in around 50% smaller than JPEG.

FormatBest forWatch for
AVIFLarge photos where every kilobyte countsNo progressive rendering; needs a fallback; not accepted in Merchant Center feeds
WebPDefault for photos and graphics, including transparency and animationKeep a JPEG or PNG fallback for older browsers
JPEGFallback for photosHeavier than WebP or AVIF at the same quality
PNGScreenshots, diagrams and line art that must stay sharpLarge files when used for photos
SVGLogos, icons and charts drawn at any sizeNot for photographs

AVIF works in Chrome 85, Edge 121, Opera 71, Firefox 93 and Safari 16.1 and later, according to MDN, which still advises a fallback because support has little historical depth. The usual setup is a picture element with an AVIF source, then a WebP source, then a JPEG or PNG in the img tag. Each browser takes the first format it can display, and Google still finds a plain src to index.

Does the format affect rankings?

Not on its own. Google lists WebP and AVIF among its supported formats without ranking one above the other. What changes is weight: Google notes that images are often the largest contributor to a page's size, and lighter files make faster pages.

Plenty of sites haven't switched yet. HTTP Archive's 2024 Web Almanac counted JPEG as 32.4% of images on mobile pages, PNG 28.4%, GIF 16.8%, WebP 12% and AVIF 1.0%. JPEG's share had fallen eight points since 2022, so the move is under way, just slowly.

The Merchant Center exception

Product feeds follow their own rules. Google Merchant Center's image_link attribute accepts JPEG, WebP, PNG, GIF, BMP and TIFF, and AVIF isn't on the list. A store that serves AVIF on product pages should keep a WebP or JPEG version of each main photo for the feed.

Image size, compression and lazy loading

Speed is where images most often hurt a page, and three habits fix most of the damage.

Serve the size the layout needs

A full-resolution photo shown in a narrow column wastes most of its bytes. srcset lists several widths of the same image and sizes tells the browser how wide the slot will be, so a phone can pick a smaller file. HTTP Archive found srcset on 42% of mobile pages in 2024, up from 34% in 2022. It also found the median sizes value 16% too large on mobile, which nudges browsers toward bigger files than they need. If you write sizes by hand, check it against the real layout.

For scale, the same report put the median weight of the largest image on a mobile page at 135 KB. Run every upload through a compressor such as Squoosh, ImageOptim or your CMS's image plugin, and judge the result by eye, not only by file size.

Set width and height on every image

MDN recommends explicit width and height attributes on all images. With them, the browser can calculate the aspect ratio before the file arrives and reserve the space, which reduces or prevents layout shift. They matter even more on lazy-loaded images, MDN adds, since an unloaded image without dimensions has a width and height of zero.

Lazy load below the fold, never the hero

loading="lazy" tells the browser to wait until an image approaches the viewport. Google's web.dev guide says Chrome starts fetching such images 1,250 pixels before they reach the viewport on fast connections and 2,500 pixels on slow ones.

The common mistake is lazy loading the image people see first. Google's lazy-loading documentation says not to add it to content likely to be visible immediately, because that content then takes longer to show up. HTTP Archive found that 9.5% of the mobile images responsible for Largest Contentful Paint were lazy-loaded in 2024, which the report calls an anti-pattern that makes pages much slower. For the hero image, do the opposite: drop loading="lazy" and consider fetchpriority="high", which MDN describes as a hint to fetch an image at high priority relative to other images.

Make sure Google sees lazy-loaded images

Google's documentation lists three workable methods: the browser's built-in lazy loading, IntersectionObserver, and JavaScript libraries that load content as it enters the viewport. What breaks indexing is loading that waits for a scroll or a click, since Google Search does not interact with your page. To check, open the page in Search Console's URL Inspection tool and look at the rendered HTML: each image URL should sit in the src of its img element.

Image sitemaps: when you need one

An image sitemap tells Google about images it might not find otherwise. Google's image sitemap documentation (opens in a new tab) names the typical case: images your site reaches with JavaScript code. Galleries, product viewers and carousels built with scripts are the usual candidates. If every image already sits in a plain img element on a page Google crawls, the sitemap adds little.

The format is short:

  • Two required tags. image:image wraps each image and image:loc holds its URL, inside the url entry of the page that shows it.
  • Up to 1,000 images per page entry.
  • Separate file or existing sitemap. Google says either approach is equally fine.
  • CDN images are allowed. The image URL can sit on another domain as long as both domains are verified in Search Console.
  • Four tags are retired. Google removed image:caption, image:title, image:geo_location and image:license from its documentation, so there is no reason to keep filling them in.

Sitemaps are one line of a wider technical SEO audit checklist, which also covers crawling, rendering and indexing problems that hold images back.

Google Images, Lens and the preview image

Choose the image Google shows beside your result

Google picks the preview image automatically, but you can steer the choice with schema.org primaryImageOfPage, an image property on the page's main entity, or the og:image meta tag. Its advice for that image: relevant to the page, not your logo, no text baked into it, no extreme aspect ratio, and high resolution where possible. Google Discover asks for more, with images at least 1,200 pixels wide and large previews enabled by the max-image-preview:large setting or by AMP.

Add structured data and license details

Structured data can earn your images a badge and rich result in Google Images, and Google states that the image attribute is a required field for that in each supported type. The schema markup guide covers how to write the markup.

License information works in a similar way. Google reads the creator, credit text, copyright notice and license URLs from structured data or from IPTC photo metadata embedded in the file, and that data can make an image eligible for the Licensable badge. If the two sources disagree, Google uses the structured data.

Get products into Google Lens

Shopping is a big share of Lens activity: Google said in October 2024 that 20 percent of Lens searches are shopping-related. Its ecommerce documentation lists three steps for products to be found in Lens results: upload product details to Google Merchant Center, opt in to product listings, and follow Google's image best practices.

Merchant Center sets its own bar for the main photo. Its image guidelines recommend 1,500 × 1,500 pixels or more, announce a 500 × 500 minimum for all products from January 31, 2027, cap files at 16 MB and 64 megapixels, and rule out promotional text, watermarks and borders. A clean, original photo of the product itself meets those rules. The rest of the product page work is in the ecommerce SEO guide.

Measure image and Lens traffic

Search Console separates this traffic. In the Performance report (opens in a new tab), the search type filter offers Image, for clicks from the Google Images tab, and Web: multimodal, for searches made with images. Google says the multimodal view includes Google Lens, Circle to Search on Android, uploaded images and Chrome image search. Check both before and after each change you make to names, formats or sitemaps.

What AI models read from an image, and what they miss

AI assistants meet your images in two ways. An assistant that fetches a page works from its HTML and text, where alt text, captions and the words around the picture live. A vision model that receives the image itself works from pixels, and the vendors' documentation is specific about what survives that step.

What the model getsWhat the documentation says
A smaller copyClaude downscales images whose long edge passes 1,568 pixels, or 2,576 pixels on its newer high-resolution models. On OpenAI's newest models, the low detail setting fits an image within 512 × 512 pixels; the higher settings keep more, with limits that vary by model.
Text inside the image, if it is large enoughClaude's guide warns that resizing can make text less legible and that accuracy drops on images under 200 pixels. OpenAI's guide advises enlarging small text.
No file name and no metadataOpenAI says its models don't process original file names or metadata. Claude doesn't parse or receive image metadata.
A short list of formatsClaude accepts JPEG, PNG, GIF and WebP. OpenAI accepts PNG, JPEG, WebP and non-animated GIF. Neither list includes AVIF or SVG.
No reliable verdict on AI-made imagesClaude's documentation says it can't determine whether an image is AI-generated and might be wrong if asked.

Two lessons follow. A fact that lives only inside an image is fragile: a price on a banner, a spec sheet exported as a PNG or a chart with small labels may not survive the resize, so put the numbers in HTML text too. And the file name, EXIF and IPTC fields work for Google, not for a model looking at pixels, as Claude's vision documentation (opens in a new tab) and OpenAI's vision guide both state.

Those format lists describe files handed straight to a model, not images an assistant meets while reading a web page, so they are no reason to give up AVIF on your site. To check whether answer engines can reach a given page, read it and quote a direct answer from it, run it through the free AEO checker.

Label AI-generated images in the file

Since Claude says it can't tell a synthetic image from a photo, provenance has to travel with the file. Google extracts the IPTC Digital Source Type field, with values such as trainedAlgorithmicMedia for images made by a model, and its About this image feature can show C2PA details on how an image was created or whether it was edited with AI tools. If you publish AI-generated illustrations or product scenes, check that your compressor keeps that metadata instead of stripping it.

Slibur dataChatGPT, United States, 4 answers, November 17, 2026

What ChatGPT said about naming, formats and Lens

We asked ChatGPT four questions on November 17, 2026, from the United States: how to name image files, whether WebP or AVIF is better, how to get product images into Google Images and Lens, and which tools compress images best. Here is what came back.

  • File names. It recommended lowercase, hyphen-separated names of about 3 to 7 meaningful words and warned against keyword stuffing. It cited no sources, and Google's guidance gives no word count, only "short, but descriptive".
  • Formats. It called AVIF usually better for performance and WebP the safer all-around default, said neither format earns a direct ranking boost, and suggested serving AVIF first with a WebP fallback. That lines up with Google's list of supported formats and with MDN's notes on AVIF.
  • Google Lens. It built the answer around crawlable product pages, Product structured data and a Merchant Center feed, and it gave Merchant Center's 1,500 × 1,500 recommendation and the 500 × 500 minimum starting January 31, 2027 correctly. For product photos it switched to JPEG, WebP or PNG without saying why. The reason is Merchant Center's format list, which leaves AVIF out.
  • Tools. It named eight: Squoosh, ImageOptim, ShortPixel, TinyPNG, Sharp, Cloudinary, Imgix and PageSpeed Insights, each matched to a workflow, from one-off edits to build pipelines and high-traffic sites.
Websites ChatGPT cited most in its answers about image SEO (November 17, 2026)

Websites ChatGPT cited as sources

  1. developers.google.cn2 of 4 answers
  2. developer.mozilla.org1 of 4 answers
  3. developers.google.com1 of 4 answers
  4. github.com1 of 4 answers
  5. imageoptim.com1 of 4 answers
  6. shortpixel.com1 of 4 answers
  7. support.google.com1 of 4 answers
Source: Slibur, ChatGPT answers from the United States, November 17, 2026.

The sources were telling. Three of the four answers cited Google pages, and two of them cited Google's image guide through a copy on developers.google.cn rather than the developers.google.com address. The tools answer cited the vendors' own help pages: ShortPixel's knowledge base, ImageOptim's preferences page and the Squoosh repository on GitHub. Pages that answer one narrow question plainly were the ones ChatGPT cited, whether they came from Google or from a tool maker.

Image SEO checklist

  1. Every meaningful image is an img element with a plain src, never a CSS background.
  2. File names are short, lowercase, hyphen-separated and describe the picture.
  3. Photos ship as WebP or AVIF with a fallback; product feeds use JPEG or WebP.
  4. Images are exported near their display size, with srcset, sizes, width and height.
  5. Only images below the fold use loading="lazy".
  6. Images loaded by scripts appear in an image sitemap, and shared images keep one URL.
  7. The preferred image is set with og:image or primaryImageOfPage, and it isn't the logo.
  8. Products are in Merchant Center with clean main photos of 1,500 × 1,500 pixels or more.
  9. Key facts shown in images also appear as text.
  10. Search Console's Image and Web: multimodal filters get checked after each change.

Checking whether AI assistants mention you

Well-built images make a page faster, easier to find in Google Images and Lens, and easier for any machine to read. They won't decide by themselves whether an AI assistant recommends your brand when someone asks about your category. Assistants build that answer from the pages they read and cite, so what those pages say about you and your rivals matters.

Slibur tracks that part. On paid plans it checks ChatGPT and Google AI Overviews every day, and Claude, Perplexity and Grok every week, with the questions your buyers ask, then shows which brands each one names, where yours appears and which websites each AI uses as sources. The 7-day free trial needs no credit card.

Frequently asked questions

Do image file names matter for SEO?

A little. Google says a file name gives very light clues about what an image shows, and it prefers names like my-new-black-kitten.jpg to IMG00023.JPG. Use a few lowercase words, separated by hyphens, that describe the picture. Don't count on AI models reading it, though: OpenAI says its models don't process original file names.

Is WebP or AVIF better for SEO?

Google supports both and doesn't rank one above the other. The difference is weight: MDN puts lossy AVIF at around 50% smaller than JPEG and lossy WebP at 25 to 35% smaller. Serve AVIF with a WebP or JPEG fallback through a picture element, and keep JPEG or WebP for Merchant Center feeds, which don't accept AVIF.

Should I lazy load every image?

No. Lazy load images below the fold and let the first visible image, usually the one that sets Largest Contentful Paint, load normally. Google's documentation warns against lazy loading content that is likely to be visible right away, and HTTP Archive found 9.5% of those key mobile images lazy-loaded in 2024, a pattern it says makes pages much slower.

Do I need an image sitemap?

Only if Google might miss some of your images. Google's typical example is images your site loads with JavaScript, such as galleries or carousels. If every image sits in a plain img element on a crawlable page, a sitemap adds little. Each page entry can list up to 1,000 images, and the image URLs can live on a CDN domain verified in Search Console.

How do I get my products to show up in Google Lens?

Google's ecommerce documentation lists three steps: upload product details to Google Merchant Center, opt in to product listings, and follow its image best practices. Use clean, original main photos without promotional text, watermarks or borders, ideally 1,500 × 1,500 pixels or larger, and follow the results with the Web: multimodal filter in Search Console.

Can AI models read the text inside my images?

Sometimes, if it's large enough. Vision models work on a resized copy: Claude downscales images whose long edge passes 1,568 pixels on most of its models, and on OpenAI's newest models the low detail setting fits an image within 512 × 512 pixels. Small labels can become unreadable, so put prices, specs and chart values in the page text as well.

About the author

Founder of Slibur

Raúl Díaz is the founder of Slibur, the tool that asks ChatGPT, Google AI Overviews, Claude, Perplexity and Grok the questions your customers ask and shows which brands they recommend. He writes about answer engine optimization from the data Slibur collects.

  • AI search

    UX SEO: What Google Measures, What It Ignores and What to Fix

    UX SEO is making sure the page that ranks also works for the person who clicks it. Google's documented UX inputs for ranking are narrow: Core Web Vitals and interaction data from its own results. Bounce rate and time on page in your analytics are not ranking inputs. The rest pays off through visitors who stay and act.

    13 min read

  • AI search

    Above the Fold SEO: What Google Checks and What to Show First

    Above the fold SEO is choosing what a visitor sees before scrolling, so that the first screen shows at once that the page answers their search. Google does not rank pages by fold position, but its current documentation still flags three things up there: ads that bury the content, intrusive interstitials and a slow Largest Contentful Paint.

    12 min read

  • AI search

    Types of SEO: A Map of What Each One Fixes and When You Need It

    The main types of SEO are technical, on-page, content and off-page SEO, which nearly every site needs, plus situational types such as local, international and ecommerce SEO, and channel types for images, video and news. Each one fixes a different problem, so the right mix depends on where your buyers search and what holds your pages back.

    10 min read