Name the file after what the image shows, in ordinary words, separated by hyphens, before you upload it. That is the whole technique. blue-ceramic-pour-over-coffee-dripper.jpg beats IMG_4471.jpg, and it beats coffee-coffee-dripper-best-coffee-dripper.jpg too.
The reason it is worth caring about is that image search is a separate queue with far less competition than the blue links, and most sites disqualify themselves from it without noticing. Below is what actually influences that, what does not, and the specific mistakes I keep finding on sites that are otherwise well built.
Why a filename carries any weight
A search engine looking at a photograph has to work out what it contains. Machine vision has improved enormously, but it still cross checks its guess against every text signal attached to that image. The filename is one of those signals, and Google’s own image guidance says as much: descriptive filenames and alt text help it understand the subject.
The filename is also unusually durable. It travels in the URL, so it survives being hotlinked, embedded, scraped or shared somewhere that strips your alt text and your caption. When someone else republishes your image, the filename is often the only description that goes with it.
None of that makes it a heavyweight ranking factor. It is a small signal. It is also close to free, which is a good ratio.
What a good image filename looks like
Three real examples, in the order most sites go through them:
- Straight off the camera.
DSC_0042.jpgtells nobody anything, including you in eight months when you are looking for it in the media library. - Keyword stuffed.
best-running-shoes-running-shoes-buy-running-shoes.jpgdescribes nothing and reads exactly like what it is. - Descriptive.
trail-running-shoe-lug-sole-closeup.jpgsays what a person would see if they opened it.
The test I use is simple. If you read the filename aloud to someone who cannot see the picture, do they know roughly what it shows? If yes, you are finished. There is no second step where you optimize it further.
The rules that matter
- Hyphens, not underscores. Google treats hyphens as word separators and has historically treated underscores as joiners, so
red_wool_scarf.jpgrisks reading as one token. Hyphens are also the WordPress convention. - Lower case throughout. Some servers treat
Photo.JPGandphoto.jpgas different files, which is a category of bug nobody enjoys chasing. - No spaces. They become
%20in the URL, which is ugly and occasionally breaks things that parse URLs naively. - Three to six words. Long enough to be specific, short enough to read. Past that you are usually repeating yourself.
- No dates or serial numbers unless the date is the point, as it is for an event photograph or a dated chart.
- Describe the image, not the page. The page has a title and a URL of its own. The filename’s job is the picture.
Filename, alt text and caption do different jobs
These get conflated constantly, usually by pasting the same string into all three. They are not interchangeable.
- Filename identifies the file. Written once, before upload, and awkward to change afterwards.
- Alt text is what a screen reader announces, and what appears if the image fails to load. Write it for a person who cannot see the image. That is its actual purpose, and search benefit is a side effect of doing it properly.
- Caption is visible to everyone, so it should add something the picture does not already say. If your caption merely narrates the image, delete it.
Alt text is where the accessibility obligation lives, and it is not optional. A decorative image gets an empty alt attribute so screen readers skip it. An informative image gets a real description. Neither of those decisions has anything to do with keywords, which is why alt text written for a search engine tends to be bad at both jobs.
Rename before you upload, never after
This is the practical trap in WordPress. Once an image is in the media library, its URL is fixed. Renaming the file afterwards changes that URL, and every existing reference to the old one breaks: the posts it is embedded in, the search results it has earned, and anywhere else on the web it is linked.
The title field in the media library is not the filename. Editing that changes what you see in the dashboard and nothing else. Plenty of people believe they have renamed an image when they have only relabeled it.
So the fix is a habit rather than a plugin. Rename files in your folder before they go anywhere near the upload button. If you genuinely must rename images already in use, that is a small migration: new URLs, redirects from the old ones, and every embed updated. Worth doing occasionally for a handful of important images. Not worth doing across an entire library.
Filenames are the cheap part
If image search matters to you, the filename is the smallest of the things that decide whether you show up.
- The page has to be relevant. Images are ranked partly on the page they sit on. A brilliant photograph on an unrelated page will not rank for the thing it depicts.
- Set width and height. Explicit dimensions stop the layout jumping as images load, which is a Core Web Vitals problem and a genuinely irritating experience.
- Use a modern format and compress properly. WebP at sensible quality is usually a large saving over the same image as JPEG.
- Do not lazy load what is visible immediately. The main image at the top of the page should load eagerly. Lazy loading it delays the largest paint and makes the page feel slower than it is.
- Let images into your sitemap. Most SEO plugins include them by default, but it is worth confirming rather than assuming.
- Use original images where you can. The same stock photograph appearing on four hundred sites gives nothing to distinguish yours.
What this looked like on a real site
On HairIsCurly, a hair care content site, images were treated as a channel from the start rather than as page decoration. Every image was named for what it showed, sized and compressed deliberately, and given alt text written for a reader instead of a crawler.
That site has since passed 1.1 million image search impressions in Google Search Console, across a library of more than fifty published articles.
Two honest caveats. Hair care is a visual subject, so image search demand was there to be captured, and a B2B software site will not see the same return from renaming its screenshots. And filenames alone did not produce that number. They were part of treating images as content, which is the actual lesson.
Things that do not help
- Repeating your target keyword in the filename, the alt text, the caption and the title. It does not compound, and it reads badly to the one audience that definitely notices.
- Bulk renaming an existing library to chase a marginal gain, which risks far more than it earns.
- Stuffing the alt attribute with a sentence nobody would ever want read aloud to them.
- Adding the file extension or the word “image” to the name.
photo-of-a-dog-image.jpgis not describing anything extra.
The short version
Before you upload, rename the file to a plain description of what it shows, in lower case, hyphen separated, three to six words. Write alt text for a person who cannot see it. Set the dimensions. Compress it. Then stop thinking about it, because the remaining upside is not where your time is best spent.
If you are not sure whether image search is worth pursuing on your site at all, that is one of the things a technical SEO audit answers, and it is a cheaper question to settle than to guess at.