How to Optimize Images for SEO
Images can make or break your site’s SEO success. They are important for keeping your content engaging and digestible; however, they can carry some harmful SEO side effects. This is why taking the time to optimize your images is so important. But before we talk about that, let’s take a step back and define what SEO is.
What is SEO?
If you are reading this you probably already have an idea of what SEO is, but just in case you don’t: SEO (Search Engine Optimization) is the art of making your website meet all the demands of search engines (namely Google) so that they rank you higher in search results.
Images often break two major demands: loading speed and “crawlability”. Loading speed is primarily dictated by how you produce the image (file type, size, dimensions, etc.). The “crawlability” of the image is primarily dictated by the code in and around the image.
Now that you know why we should optimize images, let’s see how:
Side Note: the order in which you do these steps matters.
1. Check the rights
Full disclosure: this has nothing to do with SEO, it is just really important and is often overlooked.
Any image you use without permission is a chance to be sued for a buttload of money. So unless you have thousands of dollars in legal fees lying around, check with the proprietor of the image before using it.
If you found it on a social media platform, DM the person and ask about using it on your site. If you found it on Google Images, go to the website from which Google is pulling the image and check their copyright license.
*Note: you can filter your Google search by license; but even if you do this, check out the license of the original website.
If the site has the Creative Commons CC0, you will most likely be free to do whatever you need to, but even then, check the site for any other additional conditions.
Here are some sites that I usually go to find images:
These sites all have simple terms and licenses that should give you a clear conscience as you upload your image.
2. Use the right file type
Images come in many different forms called file types; however, Google has a limit on what they will support. According to their webmasters: “Google Images supports images in the following formats: BMP, GIF, JPEG, PNG, WebP, and SVG. You can also inline images as Data URIs.”
You also want to make sure you are using the file type that best compliments the image you are uploading. Learn which file type you should use for your image.
3. Scale down the dimensions
This step relates to the loading speed of your website. The larger your image, the longer it will take to load. Therefore, every pixel is valuable real estate that will determine how fast it will load.
Use a digital ruler to measure the dimensions of where you want the image to be on your website. If it is a small employee photo, it probably only needs to be about 200 x 400 pixels. But if it is a large call to action image, it can be up to 2400 pixels wide.
No fancy image editing software is necessary. Just use Microsoft Paint or whatever your computer has.
4. Shrink the file size
The file size of your image is different than the visual dimensions of the image. An image is just a bunch of data strewn together to make render some colored pixels. Sometimes image editing software or other sites add unnecessary data to the image. This means that you could have an image that is visually small but still loads slow.
This is why you need to run your image through an image optimizer. Some that I use are:
And, if you’re feeling crazy, you can even run your image through multiple times.
These websites will trim off all the unnecessary data lowering the file size whilst keeping the image looking sharp.
Now that image is optimized for loading speed, let’s get it ready to be crawl-able.
5. Name the image
Many of your images are probably named some random string of words and letters or they have a half-written description of what’s in the picture capitalized. This is not going to cut it. The title of the image file needs to be briefly describing the image in a “slugged” format.
A slug is a phrase or series of words that has been optimized for technology to read but is still easy for humans to understand. You will often see slugs in web page URLs and optimized file names. It should be short, lowercase, and have hyphens between each word. Don’t use special characters, spaces, or underscores which can make it hard for things like search engine bots to process your slug.
Side Note: this website will do it for you!
6. Add ALT text
The ALT text is an HTML attribute that describes the purpose of the image. It stands for ‘alternate text’.
<img src="allwebpromotion/notorious-pig.png" alt="Notorious PIG rapping for the All Web Employees">
Your text should briefly explain the image using specific names of the people or places in the image, not generic titles. Make sure the ALT text also relates to the context of the photo. For you SEO buffs out there, yes, you can put keywords in your ALT text, but do so only when it is natural.
Alt-text is important for two reasons:
- Screen readers use ALT text to describe images to the visually impaired.
- Search engine bots that crawl your website use the ALT text to fully understand an image and therefore better serve it to queries. Bots are getting smarter, but they are still far from understanding images full significance and purpose.
7. Upload an image sitemap
For the overachievers out there, Google Search Console allows you to list images in your sitemaps.
In your sitemap’s code, you can specify the image’s caption, location, and license.
<image:caption> <image:geo_location> <image:title> <image:license>
All in a hard days work!
I know what you’re thinking: “I just wanted to upload a simple image, not spend forever adding boring ALT tags!” I totally get it. This just made a simple upload so much more complex.
But when it comes down to it, that’s what successful SEO is all about: getting out of your comfort zone and spending a ridiculous amount of time and effort on the simplest tasks. Just keep in mind that ultimately you’re putting in the effort to make a great experience for your customers. Also, there’s nothing like seeing your website at the top of the SERPs. So, push through! You got this! 👍