(Reading time: 4 – 7 minutes)
You will get better search engine results when images on your blog are properly described using metadata embedded in the img element’s alt, title and other attributes.
Here’s more from Jan Geronimo:
Using alt tags on images – that’s a problem, too. I’ve been using them but I’m not sure if I’m doing it right. alt tag is a description, right?
The short answer: yes, the alt attribute provides a metadata description of the image, usually limited to about 1k (1024 characters) in length, but hardly given in more than 60-70 characters.
The alt attribute long answer
Adding metadata to your images on your WordPress blog isn’t difficult, and it’s much easier if you start when your blog is new. But even when you’re well-established, providing alt attribute metadata for existing images may provide yet another way to capture traffic coming in from image searches.
There’s two aspects of image handling you need to understand:
- How images are defined by the img element in HTML.
- How the img element and it’s attributes are handled in WordPress.
WARNING: Fasten your seat belt, because this one’s going to be pretty long. Close to 2000 words, I suspect, by the time I finish it.
Required and optional attributes of <img>
For SEO purposes, we need to handle the following attributes for each image:
- src (required) You need to provide a link so that the image can be loaded.
- alt (required) The text in the alt attribute is used for accessibility; from W3C, “For user agents that cannot display images, forms, or applets, this attribute specifies alternate text.” This is not optional. The alt text is a replacement for the image, when the image cannot or will not be shown.
Your article will not validate if the alt attribute is missing. WordPress almost surely provides an empty attribute if you do not provide anything, but I haven’t checked. You can do that, let me know in the comments.
- title (optional) the title attribute is used by WordPress to display a tooltip for the image, and for describing the image in the Media Library. It may – or may not – be used by search engines as a source of keywords for the image.
An illustrative example
Let’s motivate the discussion by examining the procedure and result for embedding an image into a WordPress post.
We’ll use an image from iStockphoto of a woman at a manual typewriter. I’ve used this image before, so it’s already in my blog’s media library. Since I have 13 pages of images already in the library I had to search for this image, as you can see in the top red box. The search returned the image I was looking for as the second result.
Since I’ve used this image before (link below), I checked the Title, Caption and Description fields for correctness.
- The “Title” field is used in the Wordpress media library, and for the tooltip.
- The “Caption” field is used by the alt attribute for the image as well as the caption.
Now let’s take a look at the result. As you can see, the caption is “The old-fashioned way to publish,” and moving your pointer over the image should result in a tooltip popping up with “Woman editor with typewriter.”
Works for me!
As it turns out, WordPress won’t display the entire post. Not sure what the problem is, but it’s both known and obscure, most likely an issue related to the “shortcode” implementation. It’s bitten me before on an article I wrote about Google Analytics.
Very annoying.
I have several options here: 1. Attempt to find out what the problem is and fix it, 2. File a bug report at WordPress, or 3. Do Something Else.
Of these options, #3 is the most time effective. The rest (or at least the next part) of the article is in a new post, and our discussion will continue there.
Now, I should have enough filler text to get around the bottom of the embedded image, and I can close this article out.
Here’s the next part of this series: Advanced SEO IMG Element Handling For WordPress (Part II). We’ll pick up our discussion with a review of this article, then continue with some definitions you need to know, some idiosyncrasies of the WordPress Media Library interface and more.
More resources for img element
Here’s a couple of great links to articles written by Antti Kokonnen:
- How to optimize images for web. Here’s how to optimize images for web, with quick and easy-to-use, free tools. Hint: Optimizing images for your blog is very simple, it can even be automatic.
- Top 7 image optimization tips for SEO and site speed. With these image optimization tips, you will ensure the maximum search engine optimization for images and ensure the images load fast without losing the quality.
Would you like more? Send me a letter...



{ 15 comments }
Great post, the illustrative examples drive your points home!
Walter´s last blog ..Wing Yu, Geotechnical Engineer
@Walter –
There’s at least one more of these posts coming, maybe 3 more.
Dr Wordpress!´s last blog ..How Dangerous Are Private Label Rights To Your Blogging Credibility?
Nice work on this piece as well, I can’t even imagine how long it takes you just to do the illustrations alone.
Extreme John´s last blog ..20 Breast Cancer Awareness Do Follow Blog Images
@Extreme –
Just doing the illustrations is pretty fast.
What takes time is figuring out exactly what I want the illustration to show.
Dr Wordpress!´s last blog ..How Dangerous Are Private Label Rights To Your Blogging Credibility?
Now that’s a very clear presentation. The graphics and the picture helped a lot… Do you recommend uploading images in PNG format? As regards images you use in your blog, do you prefer uploading them to your blog or is it better to have it hosted let’s say in Flickr?
jan geronimo´s last blog ..Giving Good Loving To My Top Follow Friday People
@jan –
I always upload, which results in a backup maintenance chore. Hosting elsewhere (flickr) is a pretty good alternative… provided you’re comfortable maintaining your flickr account. I almost lost mine once.
So it’s always a trade off. TANSTAAFL, &c.
Dr Wordpress!´s last blog ..How Dangerous Are Private Label Rights To Your Blogging Credibility?
It looks like Wordpress does leave an empty alt attribute. Just went back and fixed this in one of this morning’s blog posts!
Sean´s last blog ..My Art is About Gears, Plants, and Flowers
@Sean –
Empty is valid. It just has to be present!
That is, you will validate with alt=”"
That won’t get you that extra 1-2% SEO luvin though.
Dr Wordpress!´s last blog ..How Dangerous Are Private Label Rights To Your Blogging Credibility?
Good information.. I’ve only recently become aware of the importance of writing clear descriptions for images. Daily Blog Tips pointed out the descriptions are also important for vision impaired users.
Blake @ props blog´s last blog ..Are You Ready For Google Wave?
@Blake – I have one more post coming out on how to go back through and fix images already on your blog. Should be posted sometime next week.
Dr Wordpress!´s last blog ..Being Productive At Home Is Easy… Relaxing at home is hard!
Good article. I always like SEO articles that are written well. Ironically this was exactly what I was going to look into next. Optimizing my images to make them more search engine friendly.
Thanks.
El3ments´s last blog ..Interesting News Articles
@El3ments – Thanks for the feedback.
Dr Wordpress!´s last blog ..Top 5 Biggest Lies About Blogging for Money
Psst. Either it’s not working or you forgot to link to the next step in the series.
Looking interesting though; heading over there to read the rest now (found everything on the sitemap).
Heather´s last blog ..Webcomic: The Mayans Day 3
That was called a “forward hook.”
Thanks for reminding of it.
Grab the whole series here: http://website-in-a-weekend.net/tag/geronimo/
Dave Doolin´s last blog ..Why the Apple iPad Will Make Me More Productive
Yep, used them once before (when I was using my older style tutorials) – just thought I’d assist.
Thanks for the link!
Heather´s last blog ..Webcomic: The Mayans Day 3
Comments on this entry are closed.
{ 1 trackback }