While making a post in WordPress, you must have noticed that there is an option called “Featured Image”. It is present on the right side of your post compose box. From there, you can click “Set featured image” link to upload or select a featured image to you post. If your template supports it, then this featured image will be displayed alongside your post title.

Having featured images alongside posts is a great way to make your site design attractive. Featured images are usually displayed when topics are listed. You can see them in WordPress site pages such as home page, category page etc. You don’t always have the time to set a featured image in WordPress. Sometimes, you want WordPress to automatically pick an image from your post content as the featured image. It is possible to configure WordPress in such a way.

We can easily do it is the help of the following WordPress plugin:

Auto Post Thumbnail

Installing

auto-post-thumbnail-plugin

There is a free as well as a pro version of this WordPress plugin. For our purpose, the free version is enough. Install this plugin from your WordPress admin. In your admin, go to Plugins > Add New and then search for Auto Post Thumbnail. Clicking “Install Now” will allow you to install it without having to download and upload. If you prefer you can download and upload WordPress Plugins from the official plugin download website.

Configuring and Using

There is not much to configure in this plugin. After installation, for every new post that you create with WordPress, a thumbnail is generated automatically. Just make sure that you have at least one image uploaded with your post. Remember that this plugin selects the first image to make it featured. If you do not prefer the first image as the featured one, then you must select another one manually.

Generating Featured Post Thumbnails for Past Posts

generate-post-thumbnails

This plugin is also able to set featured post image for all your previous topics. Just to go Settings > Auto Post Thumbnail and click on the button that says “Generate Thumbnails”. It might take some time if you have a large number of published posts. After a successful execution of this command, all your posts without featured image will have one assigned to them. This works as long as a post contains an image.

Disabling Automatically Generated Featured Image

skip-post-thumb-custom-field

It is also possible to disable automatically generated featured image for any post. If you manually upload a featured image, then this plugin won’t override your image. If you don’t want to have a featured image then add a skip_post_thumb custom field set while creating or editing a particular post.

Changing the Size of Thumbnails Generated

The size of thumbnails generated depends upon the configuration set by your template and not this plugin. To change the size of the thumbnail, you will have to manually edit functions.php file present in your theme folder (wordpress-site/wp-content/themes/<theme-name>/).

Just edit the line that says:

set_post_thumbnail_size

You can set thumbnail sizes like:

set_post_thumbnail_size( 200, 150);

If you want your thumbnail to be cropped then:

set_post_thumbnail_size( 220, 162, true );

You have to understand that this line only sets the image re-size or cropping dimension for future images that are uploaded. Additionally, your theme’s CSS/HTML sets the image dimensions that are displayed to your visitors.

Leave a Reply

Your email address will not be published. Required fields are marked *