We know that good site architecture usually looks like this:


Now, when it comes to Google Image search, it is clear that the img alt tag, filename/URL, and surrounding text (captions, headings, paragraphs) have an effect on ranking.

I want to ask about the filename of the images that we should use (e.g. product-photo.jpg).

...but first about the URL:

  • Often web developers stick all images in a single folder in the root: example-company.com/img/ — and I have stopped doing that. (I don't want to get into it, but basically, it seems more semantic for images which make up part of the content at each sub-directory)

However, when all images appear in a folder, I feel that their filename needs to reflect what they are a bit more than usual, for example:


It's a longer filename than just product.png, but as long as it's relevant, I see no problem with regards to SEO (unless you're keyword stuffing), and it could even help rank for keywords:

  • "example company"
  • "productname"
  • "category"

So no questions there.

But what about when we have places images in the site architecture we outlined at the beginning? In other words, what if image URL paths look like this:


My question is, should the URL be kept short like above and only have the "productname" (and some descriptive keywords) as part of it's filename?

Or, should it also include the "example-company" and "category"? Like so:


That seems much longer, and redundant when we look at the URL, but here are a few considerations.

  • Images are often downloaded onto computers, and, to the average user, they lose their original URL and thus — it isn't clear where they came from.
  • Also, some social networks, forums, and other platforms leave the filename intact when uploaded. (Many others rewrite it, for example, Pinterest and Facebook.)
  • Another consideration, will this really help (even if ever so slightly) rank in Google Image Search, or at least inform Google that the product is something specific to the "example-company"? For example, what if this product can only be bought at this store and is the flagship product? In addition to an abundance of internal links to this product page, would having the "example company" name and "category" help it appear in "example company" searches?

In other words, is less more?

  • 1
    That's a very good question, and i'd also like to hear somebody else's input on this. I myself always use the following: productype/img_name_category_company_name.jpg Commented Nov 3, 2012 at 19:25
  • 2
    This is a really interesting question and definitely something I'd be interested to know about since I've never given much thought to image filenames, just the alt-text etc.
    – shanodin
    Commented Nov 4, 2012 at 7:11

4 Answers 4


From our (Google's) point of view, you can use whatever file names & URL structure that makes sense for your site -- you definitely do not need to fine-tune it on this level for SEO purposes. For Image Search, we recommend using descriptive file names, but even if it's just a number (for example, when a photographer uploads files without modifying the file name the camera used), we can usually work with that just fine - we use a lot of signals to pick up information about an image.

The only thing I would recommend keeping an eye on with images in particular is that your chosen URLs end in a common image file extension. That makes it easier for us to recognize them as images (before crawling).

  • Thank you John, great to hear from a Googler :) So the following wouldn't seem too spammy? example-company.com/products/category/productname/example-company-category-productname.jpg Of course, it's not meant to be (I'd like users who download the image to know where it came from and which category it's in from the filename alone.)
    – Baumr
    Commented Nov 24, 2012 at 15:16

SEO tricks are no longer relevant. Also google discurages those tricks, focusing more on authenticity.

So if you want to increase in rank, focus on content, have an adiacent blog to your site, go on social media. I think images, files, domains and URLs should obviously have relevant names and alternatives, but the main focus is the content, and you being referencing by other sites and social media.

  • 1
    Thanks, you bring up an important point — something that I myself preach, but it's good you mentioned it here because I totally didn't. Anyway, I was actually asking somewhat the authenticity aspect. Maybe it wasn't clear, but in this case, since the product is made only by this company, it would be pretty darn relevant to include it into the filename. Then again, that could or could not seem spammy to Google because those same keywords appear in the URL path. Or maybe it would help... Even if it has a small effect (and other things are weighted more), still interesting to discuss.
    – Baumr
    Commented Nov 4, 2012 at 16:37
  • Both links are broken.
    – Matt
    Commented May 10, 2017 at 20:47

In my opinion, image file names are one of the most important SEO factors... as long as it's valid and meaningful.

Don't take the same exact image and rename it over and over.

Don't give an image a deceptive file name.

Let's say I have the following images on a website:

  1. black-and-white-dog.jpg
  2. friendly-orange-male-cat.jpg
  3. african-grey-parrot-77-years-old.jpg
  4. ferret-smiling-smuggly-2017.jpg

If those files are pictures of what their file name implies (and are original/unique) then it's a very strong indicator that the site is about pets/animals.

If the file names, photo content, and site aren't about pets/animals then you're in trouble.

Review this for background info:


Keep the filenames relevant. Don't try to overload them with keywords or anything like that.

Use file names that describe exactly what the image is, and then use alt tags to relate the image to your site and keywords, making sure the primary objective is still to describe the image, and not spam search engines.

  • I should have probably made it clearer that keyword stuffing and spam is out of the question :P
    – Baumr
    Commented Nov 13, 2012 at 12:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.