Images are an often overlooked part of SEO but play their own important role. Not only do images contribute to your on-page SEO, but they can act as their own search engine and potentially bring traffic as well being easily shareable to increase reach. Google has over the years worked on incorporating images into search, so it’s worth spending some time to make sure you’re following best practices.
This article will look at some practical tips you can utilize right now to optimize your images. Doing so will help your overall SEO, and set you up for success in the future.
Optimize The Name
Image optimization starts with the name of the image. This should be descriptive of what the image is of, and helps crawlers “see” the image. A bad image name gives no insight as to what the image actually is.
Take these names as examples:
Dfc12819.jpg
Dog-on-leash.jpg
One of those is much more descriptive of what the image actually is. This shows the crawlers what the image actually is, and helps them better categorize the image and your page. Images add context to the content, but without practical image names it makes it harder to decide whether an image is relevant or not.
Add Alt Text
Similar to the image name, the alt tag provides context as to what the image is all about. This is important as crawlers will use it to judge the relevance of an image, and it helps them further categorize the content on your page.
This is also a usability concern as the alt text is what people will see if the image doesn’t load. This could happen for a variety of reasons such as a slow/interrupted connection or for users with screen readers. In any case, the user will see the alt tag instead, and this can help them understand what’s missing.
Like the image name, alt tags should be descriptive of what the image is of. You can even work your keywords into the alt tag, but don’t do so at the cost of a poor description. Alt tags first and foremost should describe the image, and have keywords worked in as a secondary concern.
One last thing to note is that alt text is a requirement for having an ADA compliant website. This is important from both a usability standpoint, but also a legal one.
Reduce The Image Size
Page speed is becoming an increasingly important aspect of search engine rankings and one huge component of that is the size of the webpage. With that in mind it’s also important to note that images are often one of if not the biggest file on your site.
Large images are one of the main culprits behind large webpages and consequently the speed they render. There are a lot of techniques for minimizing the impact images have on load time, but the most basic is to reduce their size.
Most web images can be significantly compressed without a degradation in quality. I’m usually able to compress images to 40% of their original quality, sometimes even more, without any noticeable difference. That’s a huge savings, especially for image heavy sites.
You should also adjust the physical size of the image to match its use case. If an image only needs to be 400px wide then serving one that’s 1200px is a waste of resources. Your users are downloading the full image, so make sure it’s not larger than it needs to be.
There are a lot of tools that can help with this. I personally like this one as it gives me the ability to resize and adjust the quality in one go. Going through the your site and compressing images is an easy way to reduce your page size and boost the speed it renders.
Define Image Dimensions
Another important step to optimizing images is to give them an explicit height and width in pixels whenever possible. This is so the browser knows how much space to allot the image, and this prevents cumulative layout shift.
Cumulative layout shift (CLS) is when a webpage has to shift content after the page has loaded. You’ve probably noticed this, maybe you were trying to click a button and it got pushed down by an ad or some text jumped around the page.
This is frustrating, and is one of the measurements that Google uses for its core web vitals. You can think of core web vitals as a sort of health score of your site on a few key metrics, and you can probably already guess that Google uses this score as part of their ranking algorithm.
A poor score here can hurt your rankings, so it’s best to do whatever you can to improve it. While images aren’t the only thing that can cause CLS they are one of the usual suspects. Simply giving them an explicit size helps boost your score in this area.
Make Your Images Mobile Friendly
Another option you have is to use the HTML5 srcset property to display different images for different devices. This gives you the option to conditionally serve images based on the screen size and resolution of the viewing device.
This means that for desktop you can serve up a big image, while on mobile devices a cropped version that’s smaller. This can help you both have more control over the look of your site while also speeding up the site speed for mobile devices. This is important as network connections tend to be the slowest on mobile devices.
The only downside of this is it requires you to create images at different sizes and this can be time consuming. It’s best to start with high impact images, those that are particularly large or used across many pages, and move through your site over time.
Does Format Matter?
Lastly, a common question many people ask is if the format of the image matters. Put simply, it does not. Whether you use a .jpg, .png, or something else, it has no bearing on your SEO.
That said, the format can play a role in the size of the image which can affect your SEO. It’s a good idea to use the format that fits the purpose of the image.
JPG: The most popular image type, these generally have a decently small file size and can be compressed further.
PNG: Generally are larger file size than JPG but support transparency. Good for things like icons.
There’s a lot more, but those are the two most popular. I personally use JPGs for the majority of images, and only bring in PNGs when I need their supported transparency.
Do Images Impact SEO?
The simple answer is yes, and you should be doing what you can to optimize them. Images lend context to your page, and that context matters when Google is trying to figure out where to rank you. Spend some time making sure your images aren’t hurting your site's performance, and make sure moving forward that your images follow best practices or you risk hurting your rankings.