Image SEO: alt text, file names and file size
Alt text is an accessibility requirement first and a search benefit second, and writing it for the second reason produces bad alt text. Plus file size.
· 6 min read
Alt text is an accessibility requirement first
The alt attribute exists so that a person who cannot see an image can still receive what it conveys. A screen reader announces it in place of the picture. That is its purpose, it predates any search consideration, and on a page with a photograph carrying real information the absence of alt text excludes people from your content. It also serves anyone whose image failed to load, on a slow connection or a metered plan.
Search engines read it too, which is where the trouble starts. Once alt text is understood primarily as a place where a search engine looks, it stops being written for the person who needs it and becomes a place to deposit a keyword. The results are recognisable immediately: 'dental implants pune best dentist implant treatment', announced aloud to somebody trying to understand a photograph of a clinic reception. This is worse than an empty attribute, because an empty attribute merely omits information while that one actively wastes the listener's time. The order of the two purposes is not a moral preference. Writing for the reader produces text that describes the image accurately, which is exactly what a search engine wants; writing for the engine produces text that serves neither.
How to write one
Describe what the image shows, in the context of the page it sits on, as briefly as you can manage while still conveying it. The context clause matters: the same photograph needs different alt text on different pages, because what is relevant about it changes. On a page about your premises, a photograph of your reception is 'the clinic reception, with the waiting area to the left'. On a page about accessibility, the same photograph might need 'the clinic reception, with a ramp beside the entrance steps'.
A few concrete rules. Do not begin with 'image of' or 'photo of', because a screen reader has already announced that this is an image and the phrase wastes the opening words. Do not duplicate the caption, since a listener would then hear the same sentence twice. Keep it to a sentence or so; alt text is not the place for the paragraph that belongs in the body. And where an image is genuinely decorative — a background texture, a divider, an icon beside a label that already reads correctly — the right value is an explicitly empty alt attribute, which tells a screen reader to skip it. An empty alt is a decision and a missing alt is an omission, and they are read differently: a missing one causes some screen readers to announce the file name, which is nobody's idea of a description.
File names, and how much they matter
A file called IMG_20240817_113245.jpg tells nobody anything. A file called clinic-reception-desk.jpg describes its contents in the URL, which is a small, genuine signal and costs nothing at the moment you upload. Use lowercase, separate words with hyphens rather than underscores or spaces, and describe the contents rather than encoding an internal reference like a product code nobody outside the business recognises.
Being honest about the size of this effect matters, though, because file naming is where advice about images tends to overreach. It is a minor signal. Renaming every image on an existing site is not a productive use of a day, particularly since changing a file name changes its URL and breaks anything referencing the old one. Adopt the habit for everything new, fix names when you happen to be replacing an image anyway, and spend the time you saved on the next section, which is where the actual cost sits.
The size that costs you
This is the part of image handling with real consequences, and it is almost always the largest performance problem on a small business site. The typical case is a photograph straight from a phone camera — several megabytes, four thousand pixels wide — uploaded and displayed in a slot six hundred pixels wide. The browser downloads the whole file and scales it down, so the visitor paid for every one of those pixels and saw none of them. On a phone with a patchy connection, which is how a great many Indian customers will reach you, that single image can dominate the entire load.
Three things fix nearly all of it. Resize before uploading, to roughly the largest size the image is actually displayed at, allowing for higher-density screens. Use a modern format: WebP is broadly supported and substantially smaller than an equivalent JPEG, and AVIF smaller still where support allows. And always set width and height attributes on the image element, which lets the browser reserve the correct space before the file arrives — this is not a bandwidth matter but the single most common cause of layout shifting while somebody reads, and a shift at the moment of a tap makes a customer press the wrong thing.
Lazy loading, done wrong
Lazy loading defers fetching an image until it is close to being needed, which is a genuine improvement for a long page of photographs: nobody should download twenty images to read the first paragraph. In modern browsers it is one attribute, loading="lazy", with no library required.
The mistake is applying it to everything, including the image at the top of the page. Lazy loading the hero image delays the very thing that determines when the page looks like it has arrived, so the metric measuring that moment gets worse and the visitor waits longer staring at empty space. The image was going to be needed immediately and you have instructed the browser to wait before asking for it. The rule is straightforward: anything visible without scrolling loads normally, and everything below that can be lazy. The second mistake is a script-based implementation from an older era that leaves the real address in a data attribute, so a crawler that does not execute the script sees no image at all; the native attribute avoids this entirely and is what any modern site should use.
What you can check, and what you cannot
Images are one of the most self-checkable subjects in search, because everything structural is in your own markup. You can read every image element on a page and see which lack an alt attribute, which have one that is empty, and which contain a string of keywords rather than a description. You can see which lack width and height attributes. You can see the file names, the formats, and whether the hero image has been marked lazy. You can check the actual file sizes by looking at what the page requests. None of this needs an account, a subscription or a vendor, and you can re-check any of it the moment you fix it.
What you cannot determine from your own markup is how much traffic your images bring. Image search performance is reported in Search Console, free, for a verified property, and separated by search type — which is the only place that number exists for your site. And no automated check can tell you whether your alt text is any good. A checker can confirm the attribute is present and flag a value that is obviously a keyword list, and it cannot know whether the sentence accurately describes the photograph, because that requires seeing the image and understanding the page. That judgement stays with a person, which is why alt text is written at the point the image is placed rather than generated later by something that never saw it.
Common questions
Should every image have alt text?
Every image that conveys information should. Genuinely decorative images — background textures, dividers, an icon next to a label that already reads correctly — should carry an explicitly empty alt attribute so a screen reader skips them. An empty alt is a decision; a missing one is an omission, and some screen readers respond by reading the file name aloud.
Does putting keywords in alt text help?
No, and it does harm. A keyword list is read out to somebody relying on it and tells them nothing about the picture. Accurate description is also what a search engine is trying to obtain, so writing for the person who needs it produces the better result on both counts.
Which image format should I use?
WebP for most purposes — broadly supported and considerably smaller than an equivalent JPEG — with AVIF worth using where support allows. The format matters less than the dimensions: a correctly sized JPEG beats an oversized WebP, because the largest saving available is not sending pixels nobody sees.
Can a tool write my alt text for me?
It can produce something, and it cannot know whether the sentence describes the image correctly in the context of the page, because that needs seeing the picture and understanding what the page is for. A checker can confirm the attribute exists and flag an obvious keyword list; the judgement about accuracy stays with a person.
Related pages