Let's talk about your projectFree discovery callWhatsApp
SEO12 min read404 AjansOctober 8, 2026Updated: October 8, 2026

Image SEO: How Do You Write Alt Text and File Names?

Image SEO: How Do You Write Alt Text and File Names?

Alt text (the alt attribute) is an HTML attribute that briefly and honestly describes what an image shows, giving information to users who cannot see it and to search engines. A file name should be a short phrase that sums up the image's subject, with words separated by hyphens. Together with the surrounding text, they form the image's context.

Image SEO serves two different goals: contributing to the page's own ranking and winning visitors from Google Images. Both rest on the same foundation: saying clearly what the image is. In this post we cover the purpose of alt text, good and bad examples, file name and surrounding-text rules, how lazy-loading fits in and common mistakes. File size and format optimisation has its own post, so we will not repeat it here.

What is image SEO and why does it matter?

Image SEO is the set of work that helps search engines understand, index and show the images on a page in relevant searches. It matters because images support the meaning of the page and open a separate traffic channel through Google Images. They are also necessary for accessibility.

Google Images is not equally valuable in every industry. In visual fields such as products, food, architecture, design, travel and crafts it can be a serious channel; in consulting or accounting your priority is more likely accessibility and page context. Clarify your goal from the start: do you want image traffic, or are you organising images for page quality?

What is alt text for and why is it written?

The main purpose of alt text is to convey the content and function of an image to a person who cannot see it or when it fails to load. Screen readers read alt text aloud. Search engines use alt text, the file name, surrounding text and image analysis together to understand an image. So alt text is first an accessibility tool; its SEO benefit is a by-product.

That is why treating alt text as a keyword store is wrong. Google's image guidelines say alt text should be short, descriptive text that explains the image's subject and its relation to the page, and they explicitly count keyword stuffing as spam. Good alt text answers the question “what would someone who cannot see this image miss?”

  • —Informative images: charts, diagrams, product photos and screenshots should say what they show.
  • —Functional images: an image used as a link or button should say what happens when clicked (such as “Go to the quote form”).
  • —Decorative images: purely ornamental; leave the alt empty (details below).
  • —Images containing text: the text in the image must appear in the alt text or the surrounding text.
  • —Length: generally one or two short sentences; there is no hard character limit but it should read comfortably.

What are examples of good and bad alt text?

Good alt text describes the image concretely and briefly; bad alt text is empty, meaningless or a pile of keywords. The examples below show common cases. They are all invented; you should write yours according to what your own image actually shows.

  • —Bad: alt=“image1”. Good: alt=“Two technicians working on a production line at a factory in Gebze”.
  • —Bad: alt=“web design Kocaeli web design agency best web design”. Good: alt=“Design mock-up showing a corporate website on mobile and desktop side by side”.
  • —Bad: alt=“logo”. Good: alt=“Orange furniture silhouette logo of the company Örnek Mobilya”.
  • —Bad: alt=“Chart”. Good: alt=“Line chart showing monthly organic clicks rising over six months”.
  • —Bad: alt=“Image: IMG_4821.jpg”. Good: alt=“Exterior of a three-storey office building with a glass facade”.
  • —Bad: an empty alt when the image is a product photo. Good: alt=“Black leather cabin-size wheeled suitcase, shown open”.
  • —Bad: alt text starting with “image” or “photo”; screen readers already announce that it is an image.

If an image contains information, such as an infographic, alt text alone is not enough. Give the important data in the page text or in a table too, so that both screen reader users and search engines can get it.

How do you write alt text for decorative images?

For purely decorative images the alt attribute should be left empty: alt="". An empty alt tells screen readers to skip the image, so a pointless “image” announcement is not read out. Removing the alt attribute altogether is different and usually causes the file name to be read, so avoid it.

  • —Decorative examples: background patterns, divider lines, icons that only decorate.
  • —Empty alt: alt="" (not the same as omitting the attribute).
  • —CSS background images: adding non-content images as backgrounds is the natural route for decorative graphics.
  • —Do not add an important image as a background: Google crawls content images through img elements; images added only via CSS may not be indexed for image search.
  • —When in doubt, ask: “Would the meaning of the page change without this image?” If yes, write alt text.

How should an image file name be written?

A good file name is a short phrase that sums up the image's subject, with words separated by hyphens, in lower case and preferably in ASCII characters. A name like “steel-frame-warehouse-gebze.jpg” instead of “IMG_4821.jpg” keeps things tidy for you and is an extra hint for search engines. The file name alone is not a strong ranking factor, but it contributes to context.

  • —Separate words with hyphens (-); underscores (_) may be read as joining words.
  • —Use lower case; case-sensitive servers can cause problems with mixed case.
  • —Avoiding Turkish characters (ç, ğ, ı, ö, ş, ü) is generally safer to prevent link problems: “glass-balcony-installation.jpg”.
  • —Be short and descriptive; 3-6 words is enough for most images.
  • —Do not stuff keywords: “web-design-kocaeli-web-design-agency-best.jpg” looks like spam.
  • —Name files before uploading if possible; renaming after publishing changes the URL and needs a redirect.
  • —If you produce the same image in several sizes, use a consistent suffix: “-800.jpg”, “-1600.jpg”.

How do surrounding text and headings contribute to image SEO?

Search engines work out what an image is about not only from alt text but also from the nearby heading, paragraph and caption. Placing an image next to relevant text creates context that fits the page's subject. An image dropped into an unrelated spot stays contextually weak, however good its alt text.

  • —Place the image right next to the topic it illustrates.
  • —Add captions (figcaption) for meaningful images; readers often read captions.
  • —Keep the page title, H1 and relevant H2 consistent with the image's subject.
  • —Do not repeat the same image on the page unnecessarily.
  • —If you use stock photos, make sure the image genuinely relates to the topic; an unrelated image clashes with the surrounding text.
  • —Use original images where possible: your own team, product, projects; original images bring both trust and differentiation.

Do you need an image sitemap?

For most small and mid-sized sites a separate image sitemap is not required; Google finds standard img elements through normal page crawling. An image sitemap can help on sites where images load late via JavaScript, where there are very many images or where a gallery is hard to crawl. Think of it as a troubleshooting tool, not a starting requirement.

If you do add an image sitemap, know that Google considers only the image's address (image:loc); older extra tags such as title, caption and licence have been documented as no longer used. Hosting images on another domain (such as a CDN) is possible, but ownership verified in Search Console should be consistent with the sitemap. First make sure the pages themselves are properly crawlable.

  • —If images are served with a standard img src and a real URL, an extra sitemap is usually unnecessary.
  • —If images appear only after a JavaScript click, they may not be found; add real img elements.
  • —Make sure robots.txt does not block images (for example the /uploads/ folder).
  • —The images themselves should return 200; fix broken image URLs.

What should you do to get traffic from Google Images?

To get traffic from Google Images, images should be high quality, original and clearly contextualised, the page should be fast and mobile-friendly, and the image should have meaningful alt text and a file name. For clicks from image results, the image must truly add value to the page; someone who likes the image alone should also want to visit the page.

  • —Use high-quality, sufficiently large images; small, blurry ones do poorly in results.
  • —Give each image a meaningful position and surrounding text within the page.
  • —For content where you can use structured data (product, recipe, article), specify the image with appropriate markup; it supports image use in rich results.
  • —Keep the page fast and mobile-friendly; image results are mostly shown to mobile users.
  • —In the Search Console Performance report, filter the search type to “Image” to see which pages receive traffic from images.
  • —If other sites use your images without permission, plan a separate process for licensing and attribution.

How does lazy-loading work with image SEO?

Lazy-loading means an image loads only when it nears the screen, and done correctly it is compatible with SEO. What matters is that Google can find the image: use the native loading="lazy" attribute or a crawl-friendly library, and do not create the image address with JavaScript only after scrolling or clicking.

  • —Native method: add loading="lazy" to the img element; supported by browsers and Google.
  • —The image address should be in the page HTML in src or srcset; leaving it only in data-src and moving it with a script is risky.
  • —Reserve space: width and height attributes prevent layout shift (CLS).
  • —Do not lazy-load images in the first visible area of the page (above the fold).
  • —For infinite-scroll lists, also offer pagination links so every image is reachable under a URL.

The LCP image, the largest visible image on the page, should never be lazy-loaded. Otherwise the browser decides to load it late and the Largest Contentful Paint time grows. It is better to give that image fetchpriority="high" and preload it if needed. For LCP and the other metrics, see our Core Web Vitals post.

How does image SEO relate to structured data?

Structured data states, in machine-readable form, which content an image belongs to. For types such as product, recipe, article and business, the image property gives the image address; Google may use it in rich results and image search. The image in structured data should be consistent with the image visible on the page.

  • —Product: list the main and alternative product images in the image field.
  • —Article/BlogPosting: give the cover image in the image field, in different aspect ratios where needed.
  • —LocalBusiness: give a consistent, current address for the business logo and a representative photo.
  • —The image must be accessible: not blocked by robots.txt, no login required, returning 200.
  • —Do not mark up an image that is not on the page; misleading markup damages trust.

To see which fields to use for which types, see our schema/JSON-LD guide.

What are the most common image SEO mistakes?

The most common mistakes are leaving alt text empty or stuffing it with keywords, leaving file names as the camera or phone gave them, serving important images as CSS backgrounds and lazy-loading the LCP image. All are easy to fix, and fixing them improves both accessibility and search visibility.

  • —Using the same alt text on all images.
  • —Adding needless words like “image” or “photo” to alt text.
  • —Piling up keywords: “web design SEO agency Kocaeli best”.
  • —Putting an information-bearing chart in only as an image, without giving the data in text.
  • —Using spaces, Turkish characters and random numbers in file names.
  • —Copying the same image hundreds of times under different addresses.
  • —Not reserving space for images while the page loads, causing layout shift.
  • —Using images taken from other sites without rights.

A practical checklist for image SEO

The list below gives the minimum image checks before putting a page live. On a large site, it makes sense to start with the highest-traffic pages and product images.

  • —Does every informative image have short, concrete and honest alt text?
  • —Do decorative images use alt=""?
  • —Are file names short, hyphen-separated, lower-case and meaningful?
  • —Is the image next to the relevant text and heading, with captions where useful?
  • —Are image URLs in real img elements and not blocked by robots.txt?
  • —Is the above-the-fold (LCP) image not lazy-loaded, with width/height set?
  • —Is the image field consistent in structured data for important images?
  • —Are pages receiving image-search traffic checked regularly in Search Console?

If your site has a large number of images, instead of writing alt text by hand everywhere, it is efficient to prioritise the most important pages first and then set template-level rules. For example, a product image's alt text can be generated from the product name and variant, but should not be left unchecked. At 404 Ajans we also build an image inventory in our technical SEO and content work; still, the list above is enough for your own team to take the first step.

Frequently Asked Questions

How long should alt text be?+

There is no hard limit. One or two short sentences are usually enough; what matters is describing what the image shows concretely and readably. Very long, keyword-filled alt text is harmful for both screen readers and search engines.

Do I have to write alt text for every image?+

Yes for informative and functional images. For purely decorative images the alt attribute is left empty (alt="") so screen readers skip them. Removing the alt attribute entirely is not the same as leaving it empty.

Is it a problem to use Turkish characters in file names?+

It works in most cases, but because of URL-encoding and compatibility risks with some systems, ASCII characters (c instead of ç) and hyphens are safer. It is not a rule, just a practical choice that reduces the risk of errors.

Does lazy-loading images hurt SEO?+

Not when done properly. Native loading="lazy" is supported by Google. Things to watch: the image address should be in the HTML, above-the-fold and LCP images should not be lazy-loaded, and dimension attributes should be set.

Does using stock photos hurt SEO?+

It does not hurt directly, but it does not set you apart like original images do. If you use stock images, make sure they relate to the topic, keep the alt text honest and, on important pages, use original images of your own team, product and projects where possible.

E

Efe TacirlioğluFounder & Lead Developer & UI/UX Designer

Founder of 404 Ajans, based in Istanbul. Builds and designs the agency's web design, e-commerce and custom software projects end to end, drawing on a background in the gaming industry.

Ready to elevate your digital presence?

Let's talk about your project and see what we can build together.

Get in Touch