{"id":20333,"date":"2015-04-02T12:24:52","date_gmt":"2015-04-02T16:24:52","guid":{"rendered":"https:\/\/www.usefulblogging.com\/?p=20333"},"modified":"2025-02-25T19:41:22","modified_gmt":"2025-02-25T13:41:22","slug":"how-to-automatically-set-featured-image-in-wordpress","status":"publish","type":"post","link":"https:\/\/www.usefulblogging.com\/how-to-automatically-set-featured-image-in-wordpress\/","title":{"rendered":"How to Automatically Set the Featured Image in WordPress"},"content":{"rendered":"\n<p>A featured image is a very significant part of any website. It <span class=\"st\"> represents the mood, contents, or theme of a post or page of any website. Sometimes you don&#8217;t have a featured image for a post and you want to set featured image the first image automatically by grabbing the first image of your article<\/span>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-how-to-set-auto-featured-image-in-wordpress\">How to Set Auto Featured Image in WordPress?<\/h2>\n\n\n\n<p>Here&#8217;s the simple way to set featured image automatically.<\/p>\n\n\n\n<p><strong>Hints<\/strong>: Add the following code snippet to the functions.php file of your active WordPress theme to automatically set the featured image for your posts. If you add a featured image to a post, then it will override this code and display your featured image instead.<\/p>\n\n\n\n<p><script src=\"https:\/\/gist.github.com\/ataulghani\/27b598ca0a76ac2faeef29781f27911f.js\"><\/script><\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-using-auto-post-thumbnail-plugins\">Using Auto Post Thumbnail Plugins<\/h2>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p>There&#8217;s another way to automatically set the featured image by using third party auto post thumbnail WordPress plugins. These auto post thumbnail plugins which will help you to generate featured image easily and quickly from first image in a post or any custom post type.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-1-image-fetcher\">1. Image Fetcher<\/h3>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/www.usefulblogging.com\/wp-content\/uploads\/2015\/04\/Image-Fetcher-Featured-Image-Convertor.jpg\" alt=\"Image Fetcher - Featured Image Convertor\"\/><\/figure>\n\n\n\n<p>Image Fetcher is a simple plugin that automatically converts image link to the featured image easily and quickly! Basically you can start converting by just one click!<\/p>\n\n\n\n<p><a class=\"moreinfo\" href=\"https:\/\/www.usefulblogging.com\/refer\/image-fetcher\/\" target=\"_blank\" rel=\"nofollow noopener\">More Info \/ Download<\/a><\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-2-auto-post-thumbnail\">2. Auto Post Thumbnail<\/h3>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" width=\"772\" height=\"250\" src=\"https:\/\/www.usefulblogging.com\/wp-content\/uploads\/2015\/04\/Auto-Post-Thumbnail.jpg\" alt=\"\" class=\"wp-image-53872\" srcset=\"https:\/\/www.usefulblogging.com\/wp-content\/uploads\/2015\/04\/Auto-Post-Thumbnail.jpg 772w, https:\/\/www.usefulblogging.com\/wp-content\/uploads\/2015\/04\/Auto-Post-Thumbnail-96x31.jpg 96w\" sizes=\"(max-width: 772px) 100vw, 772px\" \/><\/figure>\n\n\n\n<p>Automatically generate the Post Thumbnail (Featured Thumbnail) from the first image in post or any custom post type only if Post Thumbnail is not set<\/p>\n\n\n\n<p><a class=\"moreinfo\" href=\"https:\/\/wordpress.org\/plugins\/auto-post-thumbnail\/\" target=\"_blank\" rel=\"nofollow noopener\">More Info \/ Download<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>A featured image is a very significant part of any website. It represents the mood, contents, or theme of a &#8230; <a title=\"How to Automatically Set the Featured Image in WordPress\" class=\"read-more\" href=\"https:\/\/www.usefulblogging.com\/how-to-automatically-set-featured-image-in-wordpress\/\" aria-label=\"Read more about How to Automatically Set the Featured Image in WordPress\">Read more<\/a><\/p>\n","protected":false},"author":1,"featured_media":20337,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[127],"tags":[10],"class_list":["post-20333","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-wordpress","tag-wordpress","generate-columns","tablet-grid-50","mobile-grid-100","grid-parent","grid-33","no-featured-image-padding"],"_links":{"self":[{"href":"https:\/\/www.usefulblogging.com\/wp-json\/wp\/v2\/posts\/20333","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.usefulblogging.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.usefulblogging.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.usefulblogging.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.usefulblogging.com\/wp-json\/wp\/v2\/comments?post=20333"}],"version-history":[{"count":0,"href":"https:\/\/www.usefulblogging.com\/wp-json\/wp\/v2\/posts\/20333\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.usefulblogging.com\/wp-json\/wp\/v2\/media\/20337"}],"wp:attachment":[{"href":"https:\/\/www.usefulblogging.com\/wp-json\/wp\/v2\/media?parent=20333"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.usefulblogging.com\/wp-json\/wp\/v2\/categories?post=20333"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.usefulblogging.com\/wp-json\/wp\/v2\/tags?post=20333"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}