Image filenames are an important on-page search engine optimization (SEO) element. Before adding a new image to your website, you should optimize its filename. An optimized filename will help search engines understand the image so that they can rank it, as well as the page where it's published, in the search results. For better SEO, however, there are a few steps you should take when optimizing image filenames.
Overview of Image Filenames
An image filename is simply the name of an image file. Regardless of their format, all images consist of a single file, and like all files, they require a name. You can edit an image filename by right-clicking the file and selecting "rename."
Image filenames are visible to both visitors and search engine bots. Visitors can see them by downloading images from your website or by copying the images' addresses. In comparison, search engine bots will see the filenames when crawling your website's images.
Create Unique Filenames
You shouldn't use the same filename for two or more images on your website. Whether your website has 10 images or 1,000 images, you should create a unique filename for each of them.
If you try to upload an image with the same filename as another image to the same directory, it won't work. Each file in a given directory of your website must have a unique filename. Even if you place images in different directories, though, it's recommended that you create unique filenames. No two images are exactly the same. By creating unique image filenames, search engines can comprehend the differences between your website's images.
Focus on Relevancy
Relevancy is paramount when optimizing image filenames. Filenames should provide context about the images with which they used. In other words, you should be able to identify images by reading their filenames. If you can identify an image by reading its filename, so can search engines.
Don't stuff keywords into image filenames for the sake of improving your website's SEO. Unless a keyword is relevant to an image, you should avoid using it. Instead, create highly relevant filenames that describe the images in plain text.
Place Hyphens Between Words
Most image filenames consist of multiple words. To make them legible and easy for search engines to understand, you'll have to separate the words. Using two or more words consecutively in an image filename will restrict its SEO value.
While you can't use spaces to separate multiple words in image filenames, you can use hyphens. Image filenames support hyphens. Between each word, add a single hyphen. Search engine bots are programmed to treat hyphens in filenames as a space. If they encounter an image with the filename "computer-desk-in-an-office.jpg," for example, they'll read it as "computer desk in an office."
Use Lowercase Letters
Always use lowercase letters for image filenames. If you use uppercase letters in them, some visitors may not see your website's images. Different visitors have different operating systems and web browsers. Even if you're able to see your website's images, visitors may not. A visitor's operating system or web browser may automatically convert uppercase filename letters into lowercase letters, which can prevent the images from loading.
Using only lowercase letters will improve the accessibility of your website's images. No matter what operating system or web browser they use, visitors will be able to load your website's images. As a result, they'll spend more time on your website while simultaneously sending engagement signals to search engines for better SEO.
Beware When Renaming
You should use caution when renaming images that are already published on your website. Like with standard web pages, filenames convey the location of your website's images. Visitors can load an image by typing its filename -- along with your website's domain and the appropriate directory or directories -- in their web browser.
If you change an image's filename, it will have a new location with a new address. Therefore, the image will appear broken on all pages where it was previously published. The pages will attempt to look for the image at its old location, and since it's no longer there, the image won't display. You can still edit image filenames, but you should update the pages to reflect their new location.
After editing an image filename, pull up the pages where it's published. Each instance of the image should have a link. You'll need to change these links so that they feature the new filename. The pages will then point to the image's new location as denoted by the filename, thereby allowing visitors and search engines to see the image.
Keep Filenames Short
While they technically support up to 256 characters, you should create shorter image filenames. Long image filenames are messy. They'll clutter your website's directories so that it's harder to find specific images or other files. Short filenames are cleaner and provide greater SEO value.
With short image filenames, your website may attract more inbound links. Images are often a source of inbound links. If a blogger wants to share one of your website's images, he or she may hotlink it. Hotlinking is a form of embedding in which one website displays an image from another website by linking to it. Hotlinking will consume some of your website's bandwidth, but you can acquire inbound links from it.
You'll get more inbound links from hotlinking if you create short image filenames. To hotlink an image, webmasters must copy its address. The filename, of course, is part of the address. If an image has a long filename, webmasters may not bother trying to hotlink it. A short filename makes hotlinking easier. Webmasters can copy the image's short address, after which they link to it.
Images are essential to your website's rankings. According to OptinMonster, web pages with images obtain almost twice as many views as those consisting entirely of text content. They rank higher in the search results and generate more visitor engagement, which in turn leads to more views. Just remember to optimize image filenames for maximum SEO benefit.