How to Name Image Files for SEO: File Naming Best Practices With Examples

How to Name Image Files for SEO: File Naming Best Practices With Examples

by | Jul 15, 2026 | Uncategorized | 0 comments

When it comes to on-page SEO, image file names are one of the most overlooked details. Most people upload pictures straight from their phone or camera with names like IMG_4837.jpg or DSC00021.png and wonder why their images never show up in Google Images.

Google itself confirms in its Image SEO Best Practices documentation that filenames give the search engine “very light clues” about the subject of an image. Light clues are still clues, and in competitive niches, every signal matters. This guide will show you exactly how to name your image files before uploading them to your website.

Why Image File Naming Matters for SEO

Search engines cannot “see” an image the way humans do. They rely on contextual signals to understand what a picture represents. Among these signals are:

  • The file name of the image
  • The alt text
  • The title attribute
  • The surrounding text on the page
  • The image caption

While the file name is a minor ranking factor on its own, it works together with alt text and page context to help Google decide whether your image deserves to rank in Google Images, in the AI overviews, or in standard search results.

laptop with photos

The Golden Rules of Image File Naming SEO

1. Be Descriptive, Not Generic

Your file name should describe what is actually in the image. If someone reads only the file name, they should have a clear idea of the content.

Bad File Name Good File Name
IMG_2049.jpg red-leather-office-chair.jpg
photo1.png homemade-margherita-pizza.png
screenshot.jpg google-search-console-dashboard.jpg

2. Use Hyphens to Separate Words

Google reads hyphens as word separators, but treats underscores as joiners. This means:

  • red-leather-chair.jpg is read as “red leather chair”
  • red_leather_chair.jpg is read as “redleatherchair”

Always use hyphens. Never use spaces, as they get converted to %20 in URLs and look broken.

3. Keep It Short (5 Words or Less)

Industry research consistently shows that file names should stay under 5 to 6 words. Long file names look spammy, are harder to read, and dilute the focus keyword.

  • Too long: best-affordable-red-leather-office-chair-for-home-and-work-2026.jpg
  • Just right: red-leather-office-chair.jpg

4. Place the Main Keyword First

Put the most important descriptor at the beginning of the file name. It carries slightly more weight and is easier to scan.

5. Use Lowercase Only

Some servers are case-sensitive. Mixing uppercase and lowercase can cause broken image links when files are moved between environments. Stick with all lowercase letters.

6. Avoid Special Characters and Numbers (Unless Meaningful)

Special characters like &, !, (, ), or accented letters can cause encoding issues. Random numbers add no value either. Only use numbers when they are part of the description (e.g., iphone-17-pro-back.jpg).

Common Image File Naming Mistakes to Avoid

  1. Leaving default camera names like IMG_1234.jpg or DSC0001.png
  2. Keyword stuffing like cheap-shoes-buy-shoes-best-shoes-shoes-online.jpg
  3. Using non-English characters when targeting an English audience
  4. Forgetting to rename screenshots (Screenshot 2026-06-14 at 09.41.32.png)
  5. Reusing the exact same name for different images on the same site
  6. Using spaces that turn into %20 in the URL
laptop with photos

How File Names Work Together With Alt Text

The file name and the alt text are not the same thing, but they should support each other. Think of it as a team:

  • The file name gives a quick technical hint about the image content
  • The alt text provides a fuller, human-readable description for accessibility and SEO

Example:

  • File name: golden-retriever-puppy-grass.jpg
  • Alt text: A golden retriever puppy playing in fresh green grass on a sunny afternoon

The two reinforce the same topic without being identical, which sends a clean and consistent signal to Google.

Image File Naming for E-commerce

Product images deserve extra attention because they often drive direct traffic from Google Images and Google Shopping. A solid e-commerce file naming pattern looks like this:

[product-name]-[color/variation]-[angle-or-detail].jpg

Product Recommended File Name
Running Shoe (front view) nike-pegasus-41-black-front.jpg
Running Shoe (sole) nike-pegasus-41-black-sole.jpg
Leather Sofa brown-leather-3-seater-sofa-side.jpg

Rename Before You Upload: A Simple Workflow

  1. Identify the focus keyword of the page where the image will live
  2. Describe the image in 2 to 5 words, including the keyword if it naturally fits
  3. Lowercase everything and separate words with hyphens
  4. Compress the image using a tool like TinyPNG or Squoosh
  5. Upload the file to your CMS
  6. Fill in the alt text with a complete sentence describing the image

Doing this before upload is critical. Once an image is uploaded and indexed, renaming it later can break links and force you to set up redirects.

laptop with photos

Examples: Bad vs. Good File Names in Context

Page Topic Bad Good
Vegan recipe blog food123.jpg vegan-chocolate-brownie-recipe.jpg
Real estate listing house.png modern-3-bedroom-villa-barcelona.png
SaaS landing page dashboard-final-v2.png project-management-dashboard-ui.png

Key Takeaways

  • Always rename your images before uploading
  • Use short, descriptive, lowercase file names
  • Separate words with hyphens, never underscores or spaces
  • Pair good file names with strong alt text
  • Avoid keyword stuffing and special characters

Image file naming alone will not make you rank on Google’s first page, but combined with alt text, proper compression, structured data, and a fast website, it becomes a real competitive edge, especially in Google Images.

FAQ: Image File Naming for SEO

Do image file names affect SEO?

Yes, but only as a light signal. Google has confirmed that file names provide “very light clues” about image content. They work best when combined with alt text and relevant on-page content.

Should I use underscores or hyphens in image file names?

Always use hyphens. Google treats hyphens as word separators and underscores as word joiners, which means underscored words are read as a single jumbled string.

How long should an image file name be?

Keep it under 5 to 6 words. Short, focused, and descriptive names perform best.

What is the best image file format for SEO?

WebP is currently the best modern format because it offers strong compression with high quality. JPEG remains a solid choice for photos, PNG works for graphics with transparency, and SVG is ideal for logos and icons.

Can I rename images after they are uploaded?

You can, but it is risky. Renaming images after upload may break existing links and lose any image SEO equity already built. If you must rename, set up 301 redirects from the old image URLs to the new ones.

Should the file name match the alt text exactly?

No. The file name should be a short descriptor, while the alt text should be a complete, natural sentence describing the image. They should be related but not identical.