How to Name Images for SEO (2026 Complete Guide)

How to Name Images for SEO (2026 Complete Guide)

By the ImageSEO Team. April 2026. ~7 min read.

Image file names are one of the most underrated image SEO signals in 2026. In our data across 17.5 million processed images, pages that combined keyword-aligned filenames with good alt text outranked pages with alt text alone by 34% in Google Images impressions. This guide walks through exactly how to name images for SEO — including a 9-rule playbook, before/after examples, and the WordPress/WooCommerce workflows we use on client sites.

Why image file names matter for SEO in 2026

Google Images, Bing, and the AI search layer (ChatGPT, Claude, Perplexity) all read image file names as a ranking signal. The filename is the piece of metadata that travels with an image across every surface — unlike alt text, which can be stripped by reformatting or caching, the filename persists in the CDN URL, in social shares, and in everyone’s browser tabs.

Three reasons filename matters more than people think:

  • Google’s vision model uses the filename as a disambiguation anchor. When the alt text is ambiguous ("photo of product"), the filename gives the model a concrete entity.
  • Bing Image Search weights filenames heavier than Google does. If you care about Bing (and you should, because ChatGPT’s web search sits on top of it), filenames are critical.
  • AI assistants quote filenames directly. ChatGPT will literally write out the URL of an image when citing it — a descriptive filename is a free branded citation.

How to name images for SEO: the 9 rules

1. Use hyphens, never underscores

Google treats hyphens as word separators and underscores as one long word. red-running-shoes.jpg is parsed as three words; red_running_shoes.jpg is parsed as one nonsense token. This rule has been confirmed by Google multiple times since 2012 and it hasn’t changed.

2. Describe what’s actually in the image

Stop uploading IMG_4821.jpg or DSC_0098.png. Use a descriptive name that a human would use: blue-road-bike-side-view.jpg, nikon-z8-body-front.jpg, pasta-carbonara-plated.jpg.

3. Keep it under 60 characters

Long file names get truncated in URLs and look spammy. 40–60 characters is the sweet spot. nikon-z8-camera-body-front-view.jpg > nikon-z8-mirrorless-full-frame-45mp-professional-camera-body-front-view-product-photo.jpg.

4. Match the filename to the image’s primary entity

The first word or two of the filename should name the main thing in the image. Google’s vision model weights the leading tokens more heavily. Start with the noun: running-shoes-nike-pegasus-41-black.jpg, not black-nike-pegasus-41-running-shoes.jpg.

5. Use lowercase only

Most servers are case-sensitive. My-Photo.jpg and my-photo.jpg are different URLs. Lowercase prevents 404s when someone links to your image from another site and the capitalization drifts.

6. Include your page’s target keyword — once

If your page ranks for "budget running shoes," name your hero image budget-running-shoes-review-2026.jpg. Don’t stuff the same keyword across every image on the page — it looks manipulative. One keyword-aligned image per page is plenty.

7. Skip stop words when they don’t add meaning

Drop "the," "a," "and," "of" when they don’t help a human identify the image. running-shoes-nike-black.jpg beats a-pair-of-running-shoes-made-by-nike-in-black.jpg.

8. Rename BEFORE uploading, not after

Once an image is uploaded to WordPress, its URL is set. Renaming afterwards breaks every backlink and every hotlink. Always rename on your local machine first. (Or use an automated tool — more on that below.)

9. Use WebP-friendly names

If you convert to WebP, the filename transfers. running-shoes-nike.jpg becomes running-shoes-nike.webp — which is fine. But avoid putting the format in the name: running-shoes-nike-jpg.webp is a bad filename.

Before and after: real examples

Bad filenameGood filename
IMG_4821.jpgblue-road-bike-trek-domane-side-view.jpg
DSC_0098.pngnikon-z8-body-front.png
Screenshot 2024-08-14 at 14.32.44.pngrank-math-seo-settings-2026.png
banner_final_FINAL_v7.jpgsummer-sale-2026-banner.jpg
photo-1.jpgcarbonara-plated-closeup.jpg

How to name images for SEO in WordPress

WordPress stores the filename as the image’s permanent URL slug. Your options:

  1. Manual: Rename on your desktop before uploading. Works fine for small sites.
  2. Bulk script: Rename in the WordPress media library with SQL — breaks all existing hotlinks unless you set up 301s.
  3. Automated: Install ImageSEO — it renames images on upload using AI that reads the image content and generates an SEO-optimised filename in 0.3 seconds. Works on every new upload and can bulk-process your existing media library.

How to name product images for WooCommerce SEO

For e-commerce, the filename pattern that wins is: [product-name]-[variant]-[angle].jpg. Examples:

  • nike-pegasus-41-black-side-view.jpg
  • nike-pegasus-41-black-top-view.jpg
  • nike-pegasus-41-white-side-view.jpg

Each filename tells Google the product, the variant, and the photo angle. When a shopper searches "Nike Pegasus 41 black" in Google Images, the top-viewed variant photos win.

For catalogues with 1,000+ products, manual renaming is impractical. The ImageSEO WooCommerce workflow auto-renames every product image based on the product title, variant, and gallery position.

FAQ

What is the best image file name for SEO?

The best image file name is a lowercase, hyphen-separated, descriptive name that contains the primary entity in the image and (ideally) aligns with the page’s target keyword. Example: budget-running-shoes-2026.jpg. Keep it under 60 characters.

Should I use hyphens or underscores in image names?

Always hyphens. Google treats hyphens as word separators and underscores as part of a single word. red-running-shoes.jpg is read as three keywords; red_running_shoes.jpg is read as one meaningless token.

How long should an image file name be?

Aim for 40–60 characters. Shorter than 30 usually means the filename isn’t descriptive enough. Longer than 70 looks spammy and gets truncated in URLs.

Does renaming existing images break SEO?

Yes, unless you set up 301 redirects. Renaming an image changes its URL, which breaks every external backlink, hotlink, and cached reference. If you need to rename existing images at scale, redirect the old URLs to the new ones. Most sites should leave existing filenames alone and just start naming new uploads correctly.

Do image names affect Google Lens results?

Yes. Google Lens resolves the source URL when it identifies a match, and the filename is part of that URL. A descriptive filename increases the chance that Lens surfaces your page as the source of the image.

Want your entire WordPress library renamed automatically? Try ImageSEO free — we rename 50 images on your site free, with no card required.

Our SEO Tool will grow your traffic

Why have you neglected images search engine optimization for so long ?

Try it for free
\n