Image keywords for SEO: alt text, filenames and metadata
The short answer
Google works out what an image shows from the text on the page around it, the alt text, computer vision and, to a small degree, the filename. The "tags" that matter most for image SEO are an accurate one-sentence alt text, a short descriptive filename and relevant text near the image. Embedded IPTC metadata is used for creator, credit, copyright and licensing details rather than as a keyword list. Booru tags, stock keywords and alt text each do a different job, so write each one separately.
Most of this site is about booru tags, the labels that train and organize anime-style image models. Search engines need a different kind of description. A tag list like 1girl, solo, long hair is useful to a training script but means very little to someone searching Google Images, and nothing at all to a screen-reader user.
This guide covers where image "keywords" actually live on the web: alt text, filenames, nearby text and embedded metadata. It is based on Google's image SEO best practices and its image metadata documentation, and ends with one image tagged three ways.
How Google works out what an image shows
Google's documentation names several sources it uses to understand an image:
- Alt text. Google calls it the most important attribute for image metadata and uses it alongside computer vision and the page content. For a linked image, it also acts as anchor text.
- The page itself. Google reads the page's content, including captions and image titles, and advises placing images near relevant text.
- The filename. Google says filenames give only "very light clues" about the subject.
- Structured data. Marking up images with structured data can make them eligible for rich results and badges in Google Images.
One technical rule comes first: use real <img> elements. Google finds images in the src attribute of <img>, including inside <picture>, but it doesn't index images set as CSS backgrounds. If an image matters for search, it has to be in the HTML.
Writing alt text that helps
Alt text is what a screen reader reads aloud in place of the image, and what a browser shows if the image fails to load. Write it for that person first. A good test: read the page aloud with the alt text in place of the image. Does it still make sense?
Take a photo of a red bicycle leaning against a yellow wall on a cobbled street. Here are five ways to handle its alt text:
| Markup | Verdict |
|---|---|
<img src="IMG_0412.jpg"> | Bad. No alt attribute, so some screen readers fall back to reading the filename. |
alt="bicycle bike red bike cheap bikes bike shop vintage bicycle cycling" | Bad. This is keyword stuffing. Google warns that it hurts users and may cause the site to be seen as spam. |
alt="bike" | Weak. It is accurate, but it says almost nothing. |
alt="Red city bicycle leaning against a yellow wall on a cobbled street" | Good. It is specific and short, and someone who can't see the photo gets the picture. |
alt="Our red three-speed rental bike, parked outside the shop" | Good on a bike rental page, where the context matters more than the wall. |
Some practical rules follow from that:
- Describe what matters on this page. The same photo can need different alt text on a travel blog and on a shop page.
- Skip "image of" and "picture of". Screen readers already announce that it is an image. If the medium matters, say so: "watercolor painting of…", "screenshot of…".
- Keep it to a sentence. The IPTC photo metadata standard caps its own accessibility alt text field at 250 characters, which is a sensible ceiling for HTML alt text too. Put longer explanations in a visible caption or in the text.
- Use an empty alt for decoration. A purely decorative divider or background flourish should have
alt=""so screen readers skip it. Don't leave the attribute out entirely.
Alt text by image type
The W3C's images tutorial sorts images by the job they do on the page, and each job calls for a different kind of alt text. Decorative images, covered above, are one kind. The others:
| Image type | What the alt text says | Example |
|---|---|---|
| Informative (photos, illustrations) | A short description of the essential information | alt="Red city bicycle leaning against a yellow wall" |
| Functional (an image that is a link or a button) | What happens when you use it, not what it looks like | A printer icon: alt="Print this page". A logo linking to the home page: alt="Example.com home" |
| Image of text | The same words as in the image | A banner reading "Spring sale: 20% off": alt="Spring sale: 20% off" |
| Complex (charts, diagrams) | A short alt text, plus the full data or explanation in the page text or a linked description | alt="Bar chart of monthly visitors, 2025", with a table of the numbers below it |
| Group (several images that make one point) | One alt text for the whole group, empty alt on the rest | Five star icons: alt="Rated 4 out of 5" on the first, alt="" on the others |
The functional row trips up a lot of sites. Since Google treats a linked image's alt text as anchor text, alt="logo" on a home-page link tells a screen-reader user and Google alike nothing about where the link goes. The same tutorial notes that how much detail an informative image needs depends on the site: the exact kind of bird matters on a bird-watching site and hardly at all on a page about city parks.
Drafting alt text with a captioning model
For a site with hundreds of images, a model that writes a first draft saves time, provided you read every draft. We measured our image caption generator (Florence-2 base, running in the browser) on eight test pictures and checked each caption against its picture:
- The short caption named the main subject in all eight, in 8 to 11 words, which is the length alt text usually wants. Two small slips: latte art became a "baseball design", and a mossy rock became a log.
- The detailed caption added something that was not there in four of the eight: cheese on a plain burger, text on a picture without any, a fence instead of bare branches, and papers around a cup that was next to a sugar packet.
So start from the short caption, and treat any detail in a longer one as a claim to verify. The tool removes openings like "The image shows" by default, which matches the W3C's advice not to say "image of". What a model cannot supply is the page's context: it can see a red bicycle, but only you know whether the page is about the street, the shop or the rental price.
Descriptive filenames
Google's advice is to use filenames that are short but descriptive. Avoid camera defaults like IMG00023.JPG and generic names like image1.jpg. It also recommends translating filenames when you localize images, and making sure the extension matches the real file type.
Separate the words with hyphens. Google's URL guidelines recommend hyphens rather than underscores between words, and an image filename becomes part of its URL. This is the opposite of the booru convention: red_jacket is right in a tag list, but girl-in-red-jacket.png is the better filename.
Images from a training dataset often have numbered names like 0001.png, which tell a search engine nothing. Don't swing the other way into cat-kitten-kitty-cute-cat-cats.jpg, either. Think of a filename as a short label for the picture.
Captions and nearby text
Because Google reads the page to understand the image, the text around an image counts. A visible caption under the image, a heading that describes the section, and a paragraph that mentions what the image shows all reinforce the alt text. An image of a ginger cat in an article about houseplants, with no mention of cats anywhere nearby, sends weak and mixed signals.
Use the visible caption for things the alt text shouldn't carry: credits, dates, context, or the point you want the reader to notice.
Images in the HTML: srcset, picture and lazy loading
Google's image guide accepts responsive images, with one condition: always give a plain src as a fallback, because some browsers and crawlers do not read the newer attributes. A typical photo in an article looks like this:
<img src="ginger-cat-rainy-window-800.jpg"
srcset="ginger-cat-rainy-window-480.jpg 480w,
ginger-cat-rainy-window-800.jpg 800w,
ginger-cat-rainy-window-1600.jpg 1600w"
sizes="(max-width: 600px) 100vw, 800px"
width="800" height="600"
alt="Watercolor painting of a ginger cat asleep on a pile of books on a windowsill">
- Formats. Google Search supports images in BMP, GIF, JPEG, PNG, WebP, SVG and AVIF. To serve WebP or AVIF with a JPEG fallback, wrap the image in a
<picture>element; our PNG vs JPG vs WebP guide covers which format suits which picture. - Lazy loading.
loading="lazy"is fine for images further down the page, and Google's lazy-loading documentation says to make sure lazy content loads when it becomes visible. It also says not to lazy-load content that is likely to be visible as soon as the page opens, such as the main image at the top. - One URL per image. When the same image appears on several pages, Google recommends referencing it with the same URL everywhere so it can be cached and reused instead of fetched again.
- Width and height. Stating the size lets the browser reserve the space before the file arrives, so the text does not jump as images load.
- File size. Google's guide calls images often the largest part of a page's weight. Resize to the largest size the layout shows and compress with the image compressor. For the
srcsetfiles, run the bulk image resizer once per width with the name patternORIGINAL-NAME-WIDTH, which gives names likeginger-cat-rainy-window-480.jpg.
Choosing the image Google shows for a page
Google picks the thumbnail for a page's search result, or the preview in Discover, automatically, but you can suggest one with the schema.org primaryImageOfPage property or an og:image meta tag. Google's advice for that image: relevant to the page, not a generic picture such as the site logo or an image full of text, no extreme aspect ratio, and a high resolution. For Discover it recommends large images at least 1,200 pixels wide, more than 300,000 pixels in total and preferably 16:9, enabled by the max-image-preview:large setting.
Embedded metadata: IPTC and XMP
Image files can carry metadata inside them. For photos, the main standard is IPTC Photo Metadata, usually stored as XMP. It travels with the file wherever it is copied, unless something strips it. These are the fields most relevant here:
| IPTC field | What it holds | Used by Google? |
|---|---|---|
Keywords (dc:subject) | A list of keywords about the image | Not mentioned in Google's documentation |
Description (dc:description) | A caption or description | Not mentioned |
| Creator | The photographer or artist | Yes |
| Credit Line | The credit to show when the image is published | Yes |
| Copyright Notice | The copyright owner | Yes |
| Web Statement of Rights | A URL describing the license | Yes, required for the Licensable badge |
| Licensor URL | A URL where the image can be licensed | Yes |
| Digital Source Type | How the image was made, including codes for AI-generated images | Yes |
| Alt Text (Accessibility) | Short alt text stored in the file (added in IPTC 2021.1) | Not mentioned |
Google's image metadata page says it can show creator, credit and license details in Google Images. The Web Statement of Rights field, or the license property in structured data, makes an image eligible for the Licensable badge. If IPTC data and structured data disagree, Google uses the structured data, and it doesn't guarantee either will be shown. It doesn't mention the Keywords field at all, so treat embedded keywords as something photo libraries and stock agencies read rather than as a Google ranking factor.
If you publish AI-generated images, the Digital Source Type field is worth knowing about. Google supports IPTC codes such as trainedAlgorithmicMedia to say an image was created by a trained model.
Many content management systems, image optimizers and social platforms strip metadata when they resize or recompress an image. Google recommends keeping at least the creator, credit line and copyright notice fields. Check your publishing pipeline before relying on embedded metadata.
ImgTagger writes tags to separate .txt files and doesn't edit the image files themselves. When it includes images in a ZIP download, they are the original, unmodified files, so any metadata they had is kept. Our metadata editor writes EXIF fields such as Artist, Copyright and the Windows keyword list into JPEG, PNG and WebP files, but not IPTC or XMP. To write IPTC or XMP fields, use a photo manager such as Lightroom or digiKam, or the free command-line tool ExifTool:
exiftool -sep ", " -XMP-dc:Subject="cat, sleeping, books, rain, watercolor" -XMP-dc:Creator="Your Name" painting.jpg
Image sitemaps and license markup
An image sitemap tells Google about images it might not find on its own, such as images added by JavaScript after the page loads. It takes only two tags, inside each page's entry in an ordinary sitemap:
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
xmlns:image="http://www.google.com/schemas/sitemap-image/1.1">
<url>
<loc>https://example.com/prints/rainy-afternoon</loc>
<image:image>
<image:loc>https://cdn.example.com/ginger-cat-rainy-window.jpg</image:loc>
</image:image>
</url>
</urlset>
Each page entry can list up to 1,000 images, and the images may sit on another domain, such as a CDN, as long as both domains are verified in Search Console. Older guides still show <image:caption>, <image:title>, <image:geo_location> and <image:license>: Google has removed all four from its documentation, so the description belongs in the alt text and the page, and the license in structured data.
That structured data is an ImageObject. Google requires contentUrl plus at least one of creator, creditText, copyrightNotice or license, and the Licensable badge needs license, ideally with acquireLicensePage:
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "ImageObject",
"contentUrl": "https://cdn.example.com/ginger-cat-rainy-window.jpg",
"license": "https://example.com/print-license",
"acquireLicensePage": "https://example.com/prints/rainy-afternoon",
"creditText": "Your Name",
"creator": { "@type": "Person", "name": "Your Name" },
"copyrightNotice": "© 2026 Your Name"
}
</script>
Keep this markup and the IPTC fields in the file saying the same thing; when they conflict, the structured data wins, as described above.
One image, three kinds of tags
Here is one SFW image described for three different jobs: a watercolor illustration of a ginger cat asleep on a stack of books on a windowsill, with rain running down the glass and a small potted plant beside it.
1. Booru tags, for training or organizing
no humans, cat, animal focus, sleeping, closed eyes, lying, orange fur, book stack, book, windowsill, window, rain, water drop, potted plant, indoors, watercolor (medium), traditional media
These describe only what is visible, using a fixed vocabulary. Notice what is missing. The WD14 tag list has orange_fur, but no tag for "ginger cat" or "tabby", and nothing for a mood such as "cozy".
2. Stock keywords, for a stock or print marketplace
Title: Watercolor illustration of a ginger cat sleeping on books by a rainy window
Keywords: cat, ginger cat, sleeping, watercolor, illustration, books, rain, rainy day, window, windowsill, cozy, calm, relaxation, pet, home, indoors, comfort, houseplant
Stock keywords are written for buyers who search by concept as well as content. Shutterstock asks for 7 to 50 keywords that relate directly to the image, and encourages broader topics, feelings and concepts. Adobe Stock allows up to 49 and asks contributors to put the most important ones first. Shutterstock explicitly counts unrelated or repeated keywords as spam.
3. Alt text, filename and caption, for a web page
Filename: ginger-cat-rainy-window-watercolor.jpg
Alt text: Watercolor painting of a ginger cat asleep on a pile of books on a windowsill, rain running down the glass
Caption: "Rainy Afternoon", watercolor on paper, available as an A4 print.
The alt text is one sentence for a person who can't see the image, with no list of moods. The filename is short and hyphenated. The caption carries the title, medium and sales details that don't belong in the alt text.
| Aspect | Booru tags | Stock keywords | Alt text |
|---|---|---|---|
| Written for | Models and collection search | Buyers searching a marketplace | People who can't see the image, and search engines |
| Vocabulary | Fixed list | Free, but must be relevant | Free, natural language |
| Includes moods and concepts? | No | Yes | Only if they are the point of the image |
| Length | Whatever passes the confidence threshold | 7–50 at Shutterstock, up to 49 at Adobe Stock | About one sentence |
| Order | Matters for some training setups | Most important first (Adobe Stock) | Natural reading order |
Using ImgTagger output as a starting vocabulary
ImgTagger's auto-tagger outputs booru tags today. They are not alt text and shouldn't be pasted into an alt attribute. They are still a useful starting point, because they work as a checklist of what is visible in the image. To turn them into keywords:
- Remove tags that only make sense on a booru. That means the rating tag,
no humans,animal focusand count tags like1girl. Use the blacklist so they are never written in the first place. - Translate booru phrasing into everyday words.
traditional mediapluswatercolor (medium)becomes "watercolor painting".orange furon a cat becomes "ginger cat". - Add what the vocabulary can't express. That includes the specific subject, the setting, the mood and the use case.
- Write the alt text from scratch, using the tags only to check you haven't missed anything important.
The tagger runs in your browser, so you can start from your own images on your own computer. Check our privacy policy before using unpublished or client work.
WD14 taggers were trained on Danbooru, which is mostly anime-style illustration, so they are at their best on that kind of art. On photographs, expect gaps and odd guesses. Our Danbooru tags explainer and the booru tag glossary will help you read the output, and tag pruning covers removing the noise.
Keyword stuffing and other mistakes
- Stuffing alt text. Google names this explicitly as something that can make a site look spammy. A list of synonyms helps no one.
- Reusing stock keywords as alt text. Fifty keywords are fine in a stock upload form. In an alt attribute they are keyword stuffing.
- Describing what isn't there. Don't add popular search terms that don't match the image. It misleads users, and Shutterstock counts unrelated keywords as spam.
- The same alt text on every image. Ten product photos that all say "blue mug" give no information about how they differ.
The common thread is to describe the image accurately for the person reading it. If you are deciding how to caption images for training rather than for search, see booru tags vs natural-language captions.
Run WD14 tagger models on a whole folder, then search, filter and bulk-edit the tags before exporting .txt caption files. It runs in your browser. Open the Batch WD14 Tagger & Editor.
Frequently asked questions
Does the title attribute on an image help SEO?
Google's image best-practices page focuses on alt text, filenames, page content and structured data. It doesn't list the title attribute. The attribute only shows a tooltip on hover, which touch-screen users never see, so don't use it in place of alt text or a visible caption.
How do I give an inline SVG alt text?
An SVG used in an <img> element takes an alt attribute like any other image. For SVG markup placed directly in the page, Google's image guide shows a <title> element inside the SVG, referenced with aria-labelledby on the <svg> tag.
Can I stop Google Images from showing my full-size image?
Yes. Google describes an opt-out of inline linking: when a request for the image comes with a Google domain in the referrer header, answer with status 200 or 204 and no content. Google then shows a thumbnail it made while crawling, and it says this does not count as cloaking.
Does EXIF camera or GPS data affect image rankings?
Google's image documentation doesn't say it uses camera settings or location data for ranking. GPS coordinates are a privacy risk, though, especially in photos taken at home. Consider removing location data before you publish personal photos.