Much like the alt text you use to describe an image, Google will read the filename of the image to learn about it.
- Optimizing all of your content for SEO is important for your rankings, including image filenames.
- User-friendly image filenames are more likely to be recommended by Google.
- The filename should be descriptive, include applicable keywords and use hyphens instead of spaces to separate words.
- Keep your filenames to under five to six words.
- Keep in mind that this is just one aspect of your overall SEO strategy and something you should address going forward. DO NOT worry about going back to re-upload and rename all your images!
Whomever who coined the old adage, “a picture is worth a thousand words,” probably never considered search engines.
It may be true as far as your readers are concerned, but when it comes to Google, they’re only worth as much as a computer can read.
That’s why, when it comes to optimizing images for Google, the #1 search engine recommends using descriptive filenames for images.
Below, we break down filenames — what they are, why they’re important and how they can help your rankings.
What is an image filename?
The filename is what you probably expect. Typically, it’s the same name of the image file that lives on your computer before you upload it.
This is especially true if you use the WordPress media library and most image hosting services.
If you’re exporting photos from your camera or phone, chances are the filenames are going to be a random set of numbers and letters such as “IMG_3073.jpeg”
In this case, the filename is the same name that’s sitting on your local computer (IMG_3073.jpeg), including the extension (.jpeg).
If you were to simply upload that to WordPress and insert it into a post, then that would be the filename on the internet as well.
Why Google cares about filenames
If a user downloads your photo from the internet, its default filename when downloaded to their computer is that same filename.
Just like Google cares about SEO-friendly URL structures so it’s easy for users to see at a glance what’s on a given page, it recommends user-friendly image filenames.
The idea is simple: A user knows what a photo is without having to open the file. It’s just a better overall user experience.
SEO for image filenames
In the Google SEO Starter Guide, Google gives the same advice for writing filenames as for alt text and it’s easy to execute:
Keep things short and descriptive.
Google also wants you to use an extension that accurately describes the file type. Again, it’s easy and makes perfect sense.
For example, if you’re using a jpeg image, use .jpg or .jpeg. If you’re using WebP or PNG, use their respective extensions, .webp or .png.
Chances are your photo editing software will automatically take care of the extension for you. Just make sure that when you go to rename your image, you’re not changing this to make it less accurate.
Let’s look at a real world example of an image and how you should name it:
Now, if you had to describe this image in a few words to a reader so they could see what you were talking about before showing them the image, what would you call it?
Hint: You can use a similar description to what you’re writing for the alt text, or the alternative text for the writing for the visually impaired.
It’s the same idea: Use a name that assumes if the user never gets to see the image, they’d still know what’s in it.
Google flat out says not to use filenames like “image1.jpg” or “1.jpg” in their examples of what not to do. In other words, don’t just use what your photo software spits out by default.
Rename the file so it’s descriptive. That’s the long and short of it.
Use hyphens to separate words and don’t use special characters
An important thing to note: Since you’ll be manually naming these photos, you won’t have the luxury of WordPress making sure your formatting is written out correctly.
Instead, you’ll have to do the work of making sure you’re only using letters and numbers, and ensuring you’re using a hyphen (-) and not something like an underscore ( _ ) to separate words.
If you stick to using only letters, numbers and hyphens, avoiding apostrophes or other special symbols, you’ll be in good shape.
Should I use keywords in image filenames?
Similar to our advice regarding alt text SEO, you’ll want to use your focus keyword in your filename when it’s an organic fit.
Put another way, if your long tail keyword happens to naturally describe the photo you’re uploading, then 100% use it.
Of course, there can be too much of a good thing. If you have four photos, all described by the same keyphrase, you run the risk of keyword stuffing.
Use synonyms and vary things up so all photos in the same post aren’t called “cheeesecake-photo-1.jpg,” “cheesecake-photo-2.jpg,” etc.
Instead, think about file names much like you would your alt text, e.g. “completed-cheesecake.jpg” and “cheesecake-filling.jpg.”
Similar to alt text, if you can’t think of different filenames for every photo you’re using in a post, are they really providing value to the reader?
How long should filenames be?
Historically, filenames on operating systems were meant to be shorter. There are historic filesystem limitations, such as a limit of 256 characters, which means you should err on the side of shorter for your names.
What the heck is the human translation of that? While we’ve recommended using your alt text as guidance for your image filenames, you’ll probably want to think shorter.
Keep your filenames to under five to six words and you should be fine within any character limits, and still have enough language to accurately describe the image.
Again, these are theoretical limits with most modern filesystems and operating systems. However, it never hurts to go short and descriptive, especially when that’s Google’s advice in their SEO Starter Guide.
What about existing images?
WordPress makes it difficult to rename files once they’re uploaded to the media library, so chances are you’ll have to re-upload them.
How important is this for SEO?
If you have an incredibly important, highly-trafficked post, it may be worth the time to give your images more useful file names.
In general, however, this is a small part of your SEO — but an easy and intuitive best practice to put in place going forward.
Subscribe for Updates
Stay up to date with the latest from Mediavine
It’s important to create new posts for our blogs, but that’s not the only way to get search traffic to your site. Sometimes we forget that we’re sitting on a …