IMG_4719.jpg is the most common image filename on the web. It is also one of the worst. It tells a search engine nothing, it tells a person nothing, and Google Images — which leans on filenames more than regular search does — has nothing to work with. The frustrating part is that fixing it costs nothing: a descriptive filename takes the same few seconds to type as a meaningless one. Almost nobody does it, which means getting it right is one of the rare pieces of SEO where you pull ahead of most of your competition simply by paying attention.
This is a focused, practical guide to naming image files so they earn their place in search — the rules, the reasoning behind each one, how to name different kinds of images, and the genuinely awkward problem of fixing a library you have already built. It is layer one of the five in our complete guide to image SEO in WordPress; get this layer right and the others build on a solid base.
Why filenames matter at all
A search engine assembles its understanding of an image from several signals: the alt text, the caption, the surrounding text on the page, the structured data, and the filename. The filename is not the strongest of these — alt text and page context carry more weight — but it has three properties that make it worth getting right every time. It is free: naming a file well costs no more than naming it badly. It is permanent: the filename travels with the file, so if someone hotlinks your image or it is saved and re-shared, the descriptive name goes with it. And it matters more in Google Images specifically, where the filename is a meaningful input into what the image ranks for.
There is a human reason too. Descriptive filenames make your own media library navigable. Six months from now, searching your library for “wedding-suit” finds the photo instantly; searching for “IMG_4719” finds nothing useful. The SEO benefit and the sanity benefit point the same way.
The seven rules, and why each one exists
1. Hyphens, not underscores
This is the rule that surprises people most. Google reads hyphens as word separators and underscores as joiners. So red-brick-house.jpg is read as three words — “red”, “brick”, “house” — while red_brick_house.jpg is read as the single, meaningless token “red_brick_house”. The difference is real and it is one-directional: hyphens always work, underscores always cost you. Use hyphens, every time.
2. Lowercase only
Some servers treat Photo.jpg and photo.jpg as two different files; others treat them as the same. That inconsistency is a source of subtle duplicate-URL and broken-link bugs that are not worth inviting. Mixed case also reads no better to a search engine than lowercase. Keep everything lowercase and the whole class of problem disappears.
3. Two to five descriptive words
Enough words to describe the image specifically; few enough that it stays a name and not a sentence. navy-linen-wedding-suit.jpg is four words and describes the image precisely. man-wearing-a-navy-linen-three-piece-wedding-suit-outdoors.jpg is a sentence pretending to be a filename, and the extra words dilute rather than sharpen. Aim for the two-to-five-word sweet spot.
4. Describe the image, not the keyword
The temptation is to stuff the filename with the term you want to rank for: best-wedding-suit-cheap-2026.jpg. This is the filename equivalent of keyword-stuffed alt text, and it reads as spam. Describe what is actually in the picture. If the image is genuinely of a navy linen wedding suit and that is what you want to rank for, the honest description and the keyword are the same thing — which is exactly how it should work.
5. No special characters or spaces
Spaces become %20 in URLs, which is ugly and occasionally breaks things. Other symbols — ampersands, parentheses, apostrophes — can break links outright or get mangled by different systems. Stick to lowercase letters, numbers, and hyphens. That set works everywhere, every time.
6. No dates or camera IDs
The IMG_, DSC_, and timestamp prefixes your camera and phone add carry no meaning for search and clutter the name. A date in a filename also dates the content unnecessarily — summer-collection.jpg stays evergreen, while summer-collection-2024.jpg looks stale in 2026 even if the image is still relevant. Strip the machine-generated parts and the dates.
7. Be consistent across a set
For a product with several photos, or a gallery of related images, a predictable pattern scales and stays readable: navy-linen-suit-front.jpg, navy-linen-suit-back.jpg, navy-linen-suit-detail.jpg. The consistency helps search engines understand the images are related, and it keeps your library ordered. Decide a pattern once and apply it across the set.
Naming by image type
The rules are universal, but the pattern that works best varies by what the image is for. A reference:
| Type | Pattern | Example |
|---|---|---|
| Product | product-variant-angle | navy-linen-suit-front.jpg |
| Blog hero | topic-descriptor | wordpress-image-seo-guide.jpg |
| Gallery item | subject-detail | coastal-wedding-first-dance.jpg |
| Logo | brand-logo | fotogrids-logo.svg |
| Icon | function-icon | download-icon.svg |
| Team photo | name-role | jane-smith-art-director.jpg |
For products especially, naming the variant and angle pays off twice: in Google Images, where a shopper searching “navy linen suit back” can find exactly that view, and in your own workflow, where the back-of-suit photo is one search away instead of buried in a wall of IMG_ files.
The hard part: files you already uploaded
Here is the gotcha that catches everyone, and it is worth understanding precisely. The WordPress Media Library does not rename files retroactively. Changing the “Title” field of a media item in wp-admin changes a label stored in the database — it does not change the actual filename or the URL the file is served from. So you can “rename” an image in the admin all day and the underlying IMG_4719.jpg URL stays exactly the same. To genuinely change a filename, you have to rename the source file on your computer, re-upload it, update every place that referenced the old one, and ideally redirect the old URL to the new one so you do not break links or lose any ranking the old URL had earned.
That is real work, and doing it across an entire library of thousands of images is a project, not an afternoon. So do not try to fix everything. Fix the images that matter — the ones on your highest-traffic pages, your flagship products, your best portfolio pieces — where a descriptive filename actually moves something. For the long tail of older images nobody searches for, leave them and move on. The goal is impact, not a perfectly tidy library.
Tip. The cleanest fix is upstream: rename files on your computer before you upload them, so the problem never enters your library. Most photo and design tools let you set a naming template on export — Lightroom, Capture One, and Photoshop’s export dialogs all support this. Build the habit once at the export step and every future upload arrives correctly named, with zero ongoing effort.
Do this now. Open your three highest-traffic pages, right-click each important image, and choose “Open image in new tab” to see the real filename in the URL. Any that start with IMG_, DSC_, or a number string: rename the source descriptively, re-upload, and swap them in (redirecting the old URL if the page gets real search traffic). Then set an export-naming template in your photo software so new files arrive named correctly from now on. Fix the few that matter; prevent the rest at the source.
How this fits the bigger picture
Filenames are a foundation, not a finish line. A perfectly named image with no alt text, the wrong format, and no place in your sitemap is still underperforming. The reason to get naming right is that it is the cheapest layer to fix and it compounds with the others — see how to write alt text that ranks for the next layer up, and the image SEO mistakes piece for the failures that quietly undo good naming. If your images flow through a gallery, the filenames you set on the source files carry through to how the gallery stores and serves them, so a consistent export habit pays off across every gallery you build. A well-built gallery plugin preserves your filenames rather than mangling them into generated strings — worth confirming on whatever you use.
Key takeaways
- Hyphens not underscores, lowercase, two to five descriptive words — the rules that cost nothing and most sites ignore.
- Describe the image, not your keyword; no dates, camera IDs, or special characters.
- WordPress will not rename files retroactively — the Title field is not the filename.
- Fix only the pages that matter; prevent the rest with an export-naming template in your photo software.
Do hyphens or underscores matter for SEO?
Yes. Google reads hyphens as word separators and underscores as joiners, so red-brick-house is three words while red_brick_house is one meaningless token. Always use hyphens in image filenames — it is a free, one-directional win.
Can I rename images already in my WordPress Media Library?
Not directly. Changing the media Title in wp-admin changes a database label, not the actual filename or URL. To truly rename a file you must rename the source, re-upload it, update references, and ideally redirect the old URL. Because that is real work, fix only your most important pages and name new files correctly on export.
How many words should an image filename have?
Two to five descriptive words — enough to describe the image specifically, but not so many it becomes a sentence. Four words like navy-linen-wedding-suit is ideal; a ten-word filename dilutes rather than sharpens.
Should I put the date or year in image filenames?
Generally no. Dates carry no search value and make evergreen content look stale — summer-collection ages better than summer-collection-2024. Only include a date if the image is genuinely tied to a specific year, like an annual report cover.