Automatically Add WordPress Featured Image

WordPress added what was known as thumbnails to add a specific picture for a post a while back. This was renamed to “featured image”, and regardless of the name change continues to play a role in making your posts look good. Since the blogs /sites are about information presentation in the most efficient manner, the images absolutely make sense.

To add a featured image is not really a laborious task. While creating a new post, look out for the link/button at the bottom right hand-side that helpfully says “Add Featured Image” 🙂

Now, all you need is to publish the post and the image shows up against the post making your post look beautiful. If you are confused read up further on WordPress site.

The problem (if I can call it that) is also simple –

  • This adds additional manual activities to create posts, and I am lazy
  • You may have hundreds and thousands of posts lying there that now look horrible

You can get quite confused by the design decision of not doing anything when a featured image is not found, since not all posts may contain images (yes, even today). For example the blogger platform shows the image against the post without you doing anything specific.

However for most themes the blank image place holders for WordPress posts is not reassuring.

The featured image in WordPress is a ‘feature’ that allows you to add post images, and should not be seen as limiting in the way it is designed. What should be done when there are no images or no featured images is left to the theme. It is not WordPress problem per se, but the theme’s problem.

To get around the problem you can do a couple of things:

  1. You can select a theme that shows first image in your post as the feature image (this is what themes like mesocolumn do, there many be numerous others as well)
  2. As numerous WordPress Gurus have given in numerous posts, you can add code to your existing theme to show the first image (or any image) as the featured image
  3. Use plugins to do the hard work
    • Free plugins like Auto Post Thumbnail, Auto Featured Image, Default Thumbnail Plus scan for the first image of the post (or even the category), and upload them as featured image. The first two plugins can update featured images for existing posts as well
    • There are plugins that can display category images or even the post titles when a featured image is not found (e.g. Thumbnail Grid)
    • Use a theme that does not show place holders for featured images when that is not relevant for the posts (e.g. Accessible Zen)

My problem, however, could not be addressed fully. As posted earlier, I use a lot of images hotlinked from my Google drive. After my really long search, I had zeroed in on the themes and I did not want to loose them due to this reason.

And, I could not really get comfortable with making code changes to the theme and test it for all possible scenarios.

So, I took the easy way out. I used Auto Post Thumbnail Pro – the premium version of the free plugin mentioned above.

I absolutely love the feature list..

  • Extracts the first Image or Video in post content and creates the featured image
  • If no image found in post content, use the first attached image as featured image. Existing Featured Images will not be changed
  • Ability to provide default featured image to use if post content doesn’t have any image
  • Generate thumbnails for Custom Post Types (Selectable)
  • Generate thumbnails from external images, and from imported RSS feeds
  • Generate featured images for old/legacy posts via a single click
  • Skip auto thumbnail generation right on the Post edit page
  • Images inserted via shortcodes also supported
  • Auto thumbnail generation for popular video sharing services – YouTube, Vimeo, Blip.tv, Justin.tv, DailyMotion and MetaCafe
  • Unlink Featured Images created by the plugin, or all Featured Images
  • Free updates

So, the USD 7 I spent on the plugin is well worth it. I did not have to deal with code (which I would have loved to do some other time), I did not have to search for new themes in the near future, and everyone is happy (hopefully incl. the theme author).

My advice however is to begin with the free plugins mentioned earlier in the post. If that does not cut it (you use external images, there are too many existing posts, have one too many video posts) or you are having trouble with little support, go ahead and try the premium version.