Skip to the indexed answers
Digital Marketing Index

usdigitalmarketingindex.com SEO

How do image filenames, alt text, and surrounding copy contribute to image search visibility?

Each tells a search engine something about what an image shows, with different weight. Google’s documentation describes each in its own words. The filename “can give Google very light clues about the subject matter of the image”. Of alt text it says: “The most important attribute when it comes to providing more metadata for an image is the alt text”. And the page around the image supplies context: Google “extracts information about the subject matter of the image from the content of the page, including captions and image titles” (Google’s image SEO best practices). None of the three is a place for keywords. Alt text exists first for people who cannot see the image, and a description written for them is also the description a search engine can use.

What each signal communicates

A short matrix:

Signal What it communicates Weight, per Google's wording Written for
Filename A brief label for the file "very light clues" Whoever manages the files; a hint to search engines
Alt text What the image shows, in words "The most important attribute" for image metadata People who cannot see the image; search engines
Surrounding copy What the image relates to: the topic of the passage and page Used together with alt text and image analysis Readers
Caption A visible statement about the image Named among the page content Google reads Readers
The image itself Its visual content The documentation says Google uses "computer vision algorithms" alongside alt text and page content Everyone who can see it

The documentation puts the combination in one sentence: “Google uses alt text along with computer vision algorithms and the contents of the page to understand the subject matter of the image”.

Annotated image HTML, for a hypothetical guide to boiler pressure:

<h2>Reading the pressure gauge</h2>

<p>The gauge on the front of the boiler shows system pressure in bar.
   The needle should sit in the range marked in the manufacturer's
   manual when the heating is off.</p>

<figure>
  <img
    src="/images/boiler-pressure-gauge-needle-at-one-bar.jpg"
    alt="Round boiler pressure gauge with the needle pointing at 1 bar, inside a green band"
    width="800" height="600">
  <figcaption>A pressure gauge with the needle in the green band.</figcaption>
</figure>

What each part contributes:

Part Role
<!–INLINECODE0–> on an <!–INLINECODE1–> element Makes the image discoverable; the documentation says Google finds images in the <!–INLINECODE2–> attribute of <!–INLINECODE3–> and "doesn't index CSS images"
Filename Short and descriptive, with words separated by hyphens
<!–INLINECODE4–> Describes what is visible, specifically
Heading and paragraph Place the image in a passage about the same subject
<!–INLINECODE5–> A visible caption tied to the image
<!–INLINECODE6–> and <!–INLINECODE7–> Layout stability; not a relevance signal

Writing accessibility-first alt text

Alt text is read aloud by screen readers and shown when an image fails to load. Write it as the sentence you would say to someone who cannot see the picture.

Image Weak alt Better alt Why
Photo of a gauge "gauge" "Round boiler pressure gauge with the needle pointing at 1 bar" States what is shown
Photo of a gauge "boiler pressure boiler repair boiler service cheap boiler" As above The weak version is a keyword list
Chart "chart" "Bar chart: service call-outs by month, highest in January" Conveys the information in the image
Product photo "IMG 4432" "White wall-mounted thermostat with a round display" Describes the object
Staff photo "team" "Two engineers fitting a boiler in a kitchen" Describes the scene
Logo that links to the home page "logo" "Northgate Heating, home" States the link's destination
Decorative divider "decorative line" Empty: <!–INLINECODE8–> Nothing to convey

Rules:

  • Describe what is visible and relevant to the passage.
  • Be specific and concise. A single sentence will do for a simple image.
  • Do not begin with “image of” or “picture of”. The element already says it is an image.
  • Do not repeat the caption word for word.
  • For an image that is a link, describe where the link goes. The documentation notes that alt text “is useful as anchor text if you decide to use an image as a link”.
  • For images of text, include the text.
  • For charts and diagrams, state the main point, and give the data in the page as well.
  • For purely decorative images, use an empty alt attribute, alt="", so that screen readers skip them. Omitting the attribute altogether is different and leaves assistive technology to guess.

On keywords, the documentation is direct. It asks for alt text that “uses keywords appropriately and is in context of the content of the page”, and says: “Avoid filling alt attributes with keywords”, because that “results in a negative user experience and may cause your site to be seen as spam”.

Do not describe what is not there. Alt text that claims a product feature the photograph does not show, or names a location the image was not taken in, is a false statement.

Natural nearby context

Placement does work that no attribute can.

The documentation’s advice: “Wherever possible, make sure images are placed near relevant text and on pages that are relevant to the image subject matter”.

Practice Effect
Put the image beside the paragraph it illustrates The surrounding words describe it
Use a caption where a reader would want one A visible, associated description
Give the page a title and headings that reflect its subject Page-level context
Use the image on a page about its subject A photograph of a thermostat belongs on the thermostat page
Avoid galleries of unrelated images with no text Nothing to associate each image with
Use original images where possible The image is specific to the page

Filenames, in the same spirit. The documentation recommends “filenames that are short, but descriptive”, contrasts a descriptive name with a camera-generated one, and advises against generic names such as image1.jpg. It adds that sites with thousands of images might automate naming, and that localized images should have translated filenames.

Filename Assessment
IMG00023.JPG Says nothing
image1.jpg Generic
boiler-pressure-gauge.jpg Short and descriptive
boiler-pressure-gauge-boiler-repair-cheap-boiler-service-london.jpg Keyword list

Renaming existing files changes their URLs. For images already established in search, weigh that against a “very light” benefit, and redirect old addresses if files are renamed.

Testing image discoverability

Check Method Pass condition
Image is in the HTML Fetch the page without JavaScript; find the <!–INLINECODE10–> element Present, with a <!–INLINECODE11–>
Not a CSS background Inspect how the image is placed Content images use <!–INLINECODE12–>
Lazy loading Check that the real URL is in <!–INLINECODE13–> or a supported pattern in the served or rendered HTML Image present when rendered
Crawlable Test the image URL against robots.txt, including on a separate image host Allowed
Loads Request the image URL 200, correct content type
Alt present Crawl the site; list images with missing alt Content images all have alt; decorative ones have empty alt
Alt quality Read a sample Describes the image; no keyword lists; no duplicates across different images
Context View each important image in place Beside relevant text
Rendered view URL Inspection in Search Console; view the tested page Image loaded
Accessibility Listen with a screen reader, or read the page with images off The page makes sense
Search performance Performance report with search type set to image Impressions for pages with important images

If only one check is run, make it the screen reader test. If the page reads sensibly aloud, with each image described in its place, the alt text is doing its job for both audiences.

Set expectations. These signals help Google understand an image. They do not determine whether it is shown for a given search, which also depends on the page and on everything else competing for that query.

File size and dimensions affect how quickly images load, a separate subject covered in the guide to how responsive image dimensions affect mobile page loading performance.

The summary: a descriptive filename gives a light hint, alt text states what the image shows for people and search engines alike, and the surrounding copy tells both what the image is about.

Link trail

Reader comments on this answer

Add your comment to this answer

Your email address will not be published. Required fields are marked *