Adding WordPress Alt Tags to Images

Adding WordPress Alt Tags to Images

Images are important for social media.  Researchers found that tweets with an image bet an average 35% boost in retweets.  I saw one article claiming that blog posts with images had more interaction, but no studies were cited. I always add images to my articles because they help fix the article in people’s minds, engaging the visual as well as intellectual parts of their brains.  Properly formatted images also give you an SEO boost.

Over at Yoast.com, Michiel Heijmans covers what is necessary to include images in an SEO optimized way.  It includes:

  1. Finding the right image
  2. Assigning a file name
  3. Scaling the image & reducing file size
  4. Writing captions
  5. Adding alt text and title text
  6. Adding OpenGraph tags (you can do this right in the WordPress SEO plugin)

In this post we will focus on the alt tag.

The WordPress Alt Tag Issue

WordPress Alt Tags

via Cambodia4Kidsorg at Flickr

Okay, we all agree that those things are necessary – but we have hundreds of old posts which don’t have any of those items.  What do we do?

First we need to understand how WordPress treats images in posts and in the media library.  When you upload an image to the media library, the copy in the media library is kind of a “master” copy.  If you assign it an alt tag, change the file name, etc, it will use those settings going forward when you use the image in a post.  However, the information associated with that image, the alt tag, caption, etc.  is unique to the post or page it appears in.  If you change the alt tag in a post, it will not effect other instances where you used the same image.  Similarly, if you change the alt tag in the media library, the alt tags will not change in posts that are already in the system.

This is actually a feature, because you will want to use keywords in your alt tag that correspond to the keyword for your post.  (For more on keywords, read this.)  For example, let’s say you upload a  picture of a heart and assign an alt tag like this: <img src=”heart.png” alt=”A picture of a heart” /> in the media library.  If you use that image in an article about the WordPress Heartbeat API (focus keyword: wordpress heartbeat) you’ll probably want a tag like this: <img src=”heart.png” alt=”The WordPress Heartbeat gives me heartburn” />.  But you may also use it when writing about how much you love WordPress:  <img src=”heart.png” alt=”Five reasons I love WordPress” />.

Adding Alt Tags to Images in Old Posts

Add WordPress alt tags to images in old posts.There is a plugin called Bulk SEO Image which will add alt tags to all photos appearing in your past published posts based on criteria you give it, usually based on the name of the post.  Note that it doesn’t, update the alt tags on the “master” image in the media library, just in the posts.  This is actually good because you hopefully have included your focus keyword in your title.  It isn’t ideal, but as an alternative to revisiting hundreds of old posts and manually updating the alt tags, it is pretty darn close.

Address the Problem Going Forward

Going forward, make sure you read the Yoast.com article I referenced above and change the file name, add a generic caption, title and alt text, but realize that you are going to want to change the caption, title and alt text to make it SEO friendly for the post you are embedding it.

Follow me

Submit a Comment