May 30, 2022

Image file names are important for Google

A comparison between a good file name (dog-in-a-garden.png) and a bad file name (image39_9394.png) adjacent to a picture of a dog.
A comparison between a good file name and a bad file name for a picture of a dog in a garden.

Website Tip #1: You might not have expected it but the file name of an image actually helps Google understand your picture so that it indexes both the picture and your website better. Before I explain further I want to start with a few examples that will demonstrate the difference more clearly:

Example of bad image names:

  • image39_9394.png
  • IMG_39382.png
  • download_image_50053.png

Example of good image names:

  • dog-in-a-garden.png
  • cat-playing-with-a-ball.png
  • me-and-my-friends-at-the-park.png

If you read the two lists, the difference is obvious. Without seeing the picture I understand that dog-in-a-garden.png will likely contain a picture of a dog in a garden. If I look at image39_9394.png I have no idea what it represents. If I find it difficult to understand then Google will also find it very difficult. When Google discovers an image it looks at many factors to understand what it represents. Google, as discussed in their official documentation, uses the file name as one of these factors.

Whether you use a static website generator, Shopify, SquareSpace or any other Content Management System (CMS), rename image files to contain more descriptive names to help Google understand your images better. It only takes a few moments to rename an image to give a more descriptive file name before uploading it to a website, time worth spent in my opinion.

I left a few suggestions below that I use when I rename an image to give a more descriptive name. A good general rule of thumb for me is: be succinctly descriptive.

  • Be descriptive, no keyword stashing.
    • Good: my-cat-on-a-beach-in-glenelg-south-australia.png
    • Bad: glenelg-cat-beach-adelaide-dog-followme-south-australia.png
  • Don’t make the file name too long.
    • For example: this-is-an-example-of-a-file-name-this-is-obviously-way-way-way-too-long-please-avoid-doing-this-because-it-is-way-to-long-like-really-too-long.png
  • Use dashes between words
    • Good: my-beautiful-dog.png
    • Bad: MyBeautifuldog.png
  • Don’t be malicious
    • If Google discovers you are being malicious they can penalise your website. Don’t create misleading file names with the intention to trick Google.
  • Understandable for humans, understandable for Google
    • If a human can’t understand the file name it will also be difficult for Google to understand.

Note there are also other factors, as I mentioned earlier, to help better index images, read about them on Google’s awesome article within their advanced Search Engine Optimisation (SEO) guide called Google Images best practices.

That wraps up Website Tip #1, which is the first in a series of website tips that we will publish over the next few months, check out our Instagram to stay updated.