Set WordPress Featured Image Automatically

Anyone who works in his WordPress blog with a picture and always wants or need to put one on his post - depending on the layout implementation, might like this small Plugin, which can do the setting automatically.
If not a Featured Image is set it grabs the first image that was uploaded to the article.

As another alternative, you could define another image as default image, as a fallback solution if no image was uploaded. Every time the post is saved or updated, the image will be checked and if necessary set as featured image.
Further solutions to work with images and files of the media library can be found in another post. If you want to controll the post view, then you have to add some line of code to it, see our article "Display Post Thumbnail Also In Edit Post and Page Overview". Alternatively I extended the Plugin and you can grab it from Github.

11 comments

Thanks for posting this easy to follow tutorial, I think it will prove very useful when working on large content managed websites in wordpress. It will also help customers manage their websites much more easily and avoid page layout differences if no featured image has been set.