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, not 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.
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. A filename is a label, not a keyword list.
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.
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 for photo libraries and stock agencies, not 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. 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
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.
| 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 honestly 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.
Is AI-generated alt text good enough?
Treat it as a draft. A captioning model can describe what is in the picture, but it doesn't know why the image is on your page. Edit the draft so it says what matters in context, and check it for invented details before publishing.
Do I need an image sitemap?
Only if Google might not otherwise find your images, for example when they are loaded by JavaScript after the page renders. Google says image sitemaps can list image URLs on other domains, which is useful if your images are served from a CDN.
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.