{"id":168185,"date":"2017-12-01T13:00:40","date_gmt":"2017-12-01T13:00:40","guid":{"rendered":"https:\/\/premium.wpmudev.org\/blog\/?p=168185"},"modified":"2022-03-31T23:49:31","modified_gmt":"2022-03-31T23:49:31","slug":"default-featured-image","status":"publish","type":"post","link":"https:\/\/wpmudev.com\/blog\/default-featured-image\/","title":{"rendered":"How to Create a Default Featured Image for WordPress Blog Posts"},"content":{"rendered":"<p><a href=\"https:\/\/wpmudev.com\/blog\/wordpress-featured-images\/\" target=\"_blank\" rel=\"noopener\">Featured images<\/a> are an essential part of every blog post\u2019s identity; not just for the website, but for any place online where it might be shared.<\/p>\n<p>WordPress does have a designated spot where you can easily upload a featured image for each post. However, it\u2019s easy to overlook it when you\u2019re busy trying to write a post, edit for readability, <a href=\"https:\/\/wpmudev.com\/blog\/seo-checklist\/\" target=\"_blank\" rel=\"noopener\">optimize for search<\/a>, and schedule it to publish on the most optimal day and time.<\/p>\n<div  class=\"wpdui-pic-regular  \"> <img loading=\"lazy\" decoding=\"async\" class=\"attachment-600x600 size-600x600\" src=\"https:\/\/wpmudev.com\/blog\/wp-content\/uploads\/2017\/09\/Featured-Image-Widget.png\" alt=\"Post image\" aria-hidden=\"true\" width=\"600\" height=\"410\" \/> <\/div>\n<p>So, what do you do? Hope that no one cares if your post is missing a featured image? Catch it after the fact and throw one in quickly, hoping that not too many visitors on the site or followers on social media noticed?<\/p>\n<p>Nope. There\u2019s a better solution for this: You can create a default image for blog post thumbnails.<\/p>\n<ul>\n<li><a href=\"#how-to\">How to Create a Default Image for Blog Post Thumbnails<\/a>\n<ul>\n<li><a href=\"#option-1\">Option 1: Code It In<\/a><\/li>\n<li><a href=\"#option-2\">Option 2: Use the First Post Image<\/a><\/li>\n<li><a href=\"#option-3\">Option 3: Use the Quick Featured Images Plugin<\/a><\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<h2 id=\"how-to\">How to Create a Default Image for Blog Post Thumbnails<\/h2>\n<p>Ideally, every blog post on your website will have a unique featured image associated with it.<\/p>\n<div  class=\"wpdui-pic-large   \" >\n<figure class=\"wp-caption alignnone\" data-caption=\"true\"><img loading=\"lazy\" decoding=\"async\" class=\"attachment-1050x1050 size-1050x1050\" src=\"https:\/\/wpmudev.com\/blog\/wp-content\/uploads\/2017\/09\/Blog-Post-Thumbnails.png\" alt=\"Post image\" aria-hidden=\"true\" width=\"1050\" height=\"581\" \/><figcaption class=\"wp-caption-text\">Blog post thumbnails on the WPMU DEV Blog.<\/figcaption><\/figure>\n<\/div>\n<p>As I already mentioned, adding a featured image isn\u2019t always on the list of priorities when you\u2019re working on creating a blog post (though it really should be). While you wouldn\u2019t want to rely on a default featured image thumbnail to represent each and every one of your posts (think about how silly that screenshot above would look if the same image were used for each), it\u2019s a good practice to have a backup in place.<\/p>\n<p>We all know <a href=\"https:\/\/wpmudev.com\/blog\/creating-beautiful-images-wordpress-posts\/\" target=\"_blank\" rel=\"noopener\">how important images are<\/a> to the users\u2019 experience when reading content. They\u2019re just as important in luring in visitors, followers, and newcomers to your posts. The enticing meta descriptions or post summaries are good and all, but the image? Well, the image often convinces people to actually read those descriptions in the first place.<\/p>\n<p>You may have noticed \u2013 but most likely not \u2013 that we have a default featured image set up for the WPMU DEV blog. It appears for older posts in our archives, which, for whatever reason, are missing a featured image.<\/p>\n<p>So, this is why you need a default blog post thumbnail set up for your WordPress site\u2014for those rare occurrences when you forget to associate one with a post.<\/p>\n<p>In terms of setting this up, there are three methods by which you can add a default image so no post will ever go featured image-less again. But first, you\u2019ll need to upload the default image you want to use to WordPress. Typically, a business logo, branded image, or recognizable mascot is the best option for this:<\/p>\n<div  class=\"wpdui-pic-large   \" >\n<figure class=\"wp-caption alignnone\" data-caption=\"true\"><img loading=\"lazy\" decoding=\"async\" class=\"attachment-1050x1050 size-1050x1050\" src=\"https:\/\/wpmudev.com\/blog\/wp-content\/uploads\/2017\/09\/WPMU-Branded-Image-Upload.png\" alt=\"Post image\" aria-hidden=\"true\" width=\"1050\" height=\"547\" \/><figcaption class=\"wp-caption-text\">WPMU branded image upload<\/figcaption><\/figure>\n<\/div>\n<h3 id=\"option-1\">Option 1: Code It In<\/h3>\n<p>You can hard-code a default featured image into your theme\u2019s file. This way, any time a post thumbnail is not present, it will automatically pull in the default one you uploaded to WordPress.<\/p>\n<p><b>Step 1<\/b><br \/>\nOpen your <a href=\"https:\/\/wpmudev.com\/blog\/how-to-create-wordpress-child-theme\/\" target=\"_blank\" rel=\"noopener\">child theme<\/a> file.<\/p>\n<p><b>Step 2<\/b><br \/>\nAdd this code to the_post_thumbnail() function:<\/p>\n<div class=\"gist\" data-gist=\"aa2cb95b246bdcf026b1efc3f2ce7cb2\" data-gist-file=\"the_post_thumbnail_function\"><a class=\"loading\" href=\"https:\/\/gist.github.com\/aa2cb95b246bdcf026b1efc3f2ce7cb2.js?file=the_post_thumbnail_function\">Loading gist aa2cb95b246bdcf026b1efc3f2ce7cb2<\/a><div class=\"gist-consent-notice\" style=\"display:none\"><p>Please <a href=\"javascript:Cookiebot.renew()\">update your cookie preferences<\/a> to enable preference cookies to view this gist.<\/p><\/div><\/div>\n<p><b>Step 3<\/b><br \/>\nUpdate the \u201cdefault-image.jpg\u201d part of the code to the actual name of the featured image file you uploaded to WordPress.<\/p>\n<p><b>Step 4<\/b><br \/>\nSave your changes.<\/p>\n<h3 id=\"option-2\">Option 2: Use the First Post Image<\/h3>\n<p>If your blog posts already have images included within the content, then you shouldn\u2019t need to assign a default, generic image to them. The image content already exists; it just wasn\u2019t slotted into the featured image widget.<\/p>\n<p>So, here is what you do:<\/p>\n<p><b>Step 1<\/b><br \/>\nAdd this to your theme\u2019s <em>function.php<\/em> file:<\/p>\n<div class=\"gist\" data-gist=\"4f6a3892884d35492b1c9a207b168bfe\" data-gist-file=\"first-post-image\"><a class=\"loading\" href=\"https:\/\/gist.github.com\/4f6a3892884d35492b1c9a207b168bfe.js?file=first-post-image\">Loading gist 4f6a3892884d35492b1c9a207b168bfe<\/a><div class=\"gist-consent-notice\" style=\"display:none\"><p>Please <a href=\"javascript:Cookiebot.renew()\">update your cookie preferences<\/a> to enable preference cookies to view this gist.<\/p><\/div><\/div>\n<p><b>Step 2<\/b><br \/>\nYou\u2019ll then have to add this code to your child theme file so the first image found in each post will be assigned as the thumbnail if there is no featured image:<\/p>\n<div class=\"gist\" data-gist=\"cef9344d4426bc26827f0d73eb34ba27\" data-gist-file=\"if-no-featured-images\"><a class=\"loading\" href=\"https:\/\/gist.github.com\/cef9344d4426bc26827f0d73eb34ba27.js?file=if-no-featured-images\">Loading gist cef9344d4426bc26827f0d73eb34ba27<\/a><div class=\"gist-consent-notice\" style=\"display:none\"><p>Please <a href=\"javascript:Cookiebot.renew()\">update your cookie preferences<\/a> to enable preference cookies to view this gist.<\/p><\/div><\/div>\n<p><b>Step 3<\/b><br \/>\nSave all your changes.<\/p>\n<h3 id=\"option-3\">Option 3: Use the Quick Featured Images Plugin<\/h3>\n<figure id=\"attachment_204920\" class=\"wp-caption aligncenter\" data-caption=\"true\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-204920\" src=\"https:\/\/wpmudev.com\/blog\/wp-content\/uploads\/2017\/12\/quick-featured-images-plugin.png\" alt=\"Quick Featured Images\" width=\"600\" height=\"274\" \/><figcaption class=\"wp-caption-text\">Quick Featured Images plugin<\/figcaption><\/figure>\n<p>The <a href=\"https:\/\/wordpress.org\/plugins\/quick-featured-images\/\" rel=\"noopener\" target=\"_blank\">Quick Featured Images plugin<\/a> is a great choice not just for assigning a default post thumbnail, but also because it gives you more overall control of your featured images. It will help you:<\/p>\n<ul>\n<li>Bulk edit featured images<\/li>\n<li>Update featured images right from within the Posts main page<\/li>\n<li>Create rules for which default featured image will be applied to posts<\/li>\n<\/ul>\n<p>The premium version of the plugin enables you to assign the first post image as the featured thumbnail. It also will create a featured image from other content in your post, like a photo gallery, the home page\u2019s main image, or embedded video content.<\/p>\n<p>Curious to see how the free version works? Let\u2019s take a quick look:<\/p>\n<p><b>Step 1<\/b><br \/>\nOnce you\u2019ve installed and activated the plugin, quickly take a look at the settings. There isn\u2019t much to define, but you\u2019ll at least want to review the new column options this plugin wants to add to WordPress.<\/p>\n<div  class=\"wpdui-pic-regular  \"><img loading=\"lazy\" decoding=\"async\" class=\"attachment-600x600 size-600x600\" src=\"https:\/\/wpmudev.com\/blog\/wp-content\/uploads\/2017\/09\/Quick-Featured-Images-Settings.png\" alt=\"Post image\" aria-hidden=\"true\" width=\"600\" height=\"298\" \/><\/div>\n<p>If you visit your main Posts or Pages lists, you\u2019ll then see that each entry either has a featured image associated with it:<\/p>\n<div  class=\"wpdui-pic-regular  \"><img loading=\"lazy\" decoding=\"async\" class=\"attachment-600x600 size-600x600\" src=\"https:\/\/wpmudev.com\/blog\/wp-content\/uploads\/2017\/09\/Thank-You-featured-image.png\" alt=\"Post image\" aria-hidden=\"true\" width=\"600\" height=\"186\" \/><\/div>\n<p>Or no featured image associated with it:<\/p>\n<div  class=\"wpdui-pic-regular  \"><img loading=\"lazy\" decoding=\"async\" class=\"attachment-600x600 size-600x600\" src=\"https:\/\/wpmudev.com\/blog\/wp-content\/uploads\/2017\/09\/Contact-no-featured-image.png\" alt=\"Post image\" aria-hidden=\"true\" width=\"600\" height=\"164\" \/><\/div>\n<p>This will be a big time-saver going forward when you\u2019re curious as to which pages or posts actually have thumbnails assigned to them.<\/p>\n<p><b>Step 2<\/b><br \/>\nAs you can see, there are different actions you can take beneath each of the featured images (or lack thereof) within these lists. However, our concern today is on how to easily create a default post thumbnail without having to tediously deal with each featured image-less post.<\/p>\n<p>So, return back to your new Featured Images menu tab. Go to Preset Featured Images.<\/p>\n<p>You\u2019ll be given three rules to set:<\/p>\n<div  class=\"wpdui-pic-regular  \"><img loading=\"lazy\" decoding=\"async\" class=\"attachment-600x600 size-600x600\" src=\"https:\/\/wpmudev.com\/blog\/wp-content\/uploads\/2017\/09\/Plugin-Option-1.png\" alt=\"Post image\" aria-hidden=\"true\" width=\"600\" height=\"79\" \/><\/div>\n<p>The first will ask if you want to automatically assign the uploaded featured image to every blog post, regardless of whether you have a featured image or not. This option won\u2019t be ideal for most of you as it means every post will have the same image.<\/p>\n<p>It\u2019s really only a good option if you set rules for how featured images are assigned to posts and pages <em>and<\/em> you have categories and taxonomies that would benefit from using the same uniform image. This could possibly work for case study pages, product categories, or posts authored by specific people.<\/p>\n<div  class=\"wpdui-pic-regular  \"><img loading=\"lazy\" decoding=\"async\" class=\"attachment-600x600 size-600x600\" src=\"https:\/\/wpmudev.com\/blog\/wp-content\/uploads\/2017\/09\/Plugin-Option-2.png\" alt=\"Post image\" aria-hidden=\"true\" width=\"600\" height=\"210\" \/><\/div>\n<p>The second rule will achieve the same effect as option #2 above. However, you\u2019ll have the benefit of not having to hard code this into your theme files while also getting to choose which page types you want this rule to apply to (so it wouldn\u2019t just be blog posts).<\/p>\n<div  class=\"wpdui-pic-regular  \"><img loading=\"lazy\" decoding=\"async\" class=\"attachment-600x600 size-600x600\" src=\"https:\/\/wpmudev.com\/blog\/wp-content\/uploads\/2017\/09\/Plugin-Option-3.png\" alt=\"Post image\" aria-hidden=\"true\" width=\"600\" height=\"242\" \/><\/div>\n<p>The final rule is the one everyone should experiment with. Even if you choose not to define different featured images for the various types of content on your blog, you\u2019ll still at least need to upload your preferred default image here. As you can see from the example above, you don\u2019t have to use the same exact image for all of your posts. If you want each thumbnail-less post to still have a relevant image assigned to it, you can establish that here.<\/p>\n<p><b>Step 3<\/b><br \/>\nOnce you\u2019re done, save all your changes.<\/p>\n<h2>Wrapping Up<\/h2>\n<p>So, there you have it. Yet another way to automate the process of covering all your bases in WordPress. Although this one may not seem as significant as some of the other methods we\u2019ve discussed in the past, remember that images are really important to the user experience. This is true not just here in WordPress, but also around the web as others encounter your content on social media, in RSS feeds, and so on.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Featured images are an essential part of every blog post\u2019s identity; not just for the website, but for any place online where it might be shared. WordPress does have a designated spot where you can easily upload a featured image for each post. However, it\u2019s easy to overlook it when you\u2019re busy trying to write [&hellip;]<\/p>\n","protected":false},"author":344989,"featured_media":169299,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"blog_reading_time":"","wds_primary_category":0,"wds_primary_tutorials_categories":0,"footnotes":""},"categories":[263],"tags":[16],"tutorials_categories":[],"class_list":["post-168185","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-tutorials","tag-images"],"_links":{"self":[{"href":"https:\/\/wpmudev.com\/blog\/wp-json\/wp\/v2\/posts\/168185","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wpmudev.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/wpmudev.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/wpmudev.com\/blog\/wp-json\/wp\/v2\/users\/344989"}],"replies":[{"embeddable":true,"href":"https:\/\/wpmudev.com\/blog\/wp-json\/wp\/v2\/comments?post=168185"}],"version-history":[{"count":8,"href":"https:\/\/wpmudev.com\/blog\/wp-json\/wp\/v2\/posts\/168185\/revisions"}],"predecessor-version":[{"id":208453,"href":"https:\/\/wpmudev.com\/blog\/wp-json\/wp\/v2\/posts\/168185\/revisions\/208453"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/wpmudev.com\/blog\/wp-json\/wp\/v2\/media\/169299"}],"wp:attachment":[{"href":"https:\/\/wpmudev.com\/blog\/wp-json\/wp\/v2\/media?parent=168185"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/wpmudev.com\/blog\/wp-json\/wp\/v2\/categories?post=168185"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/wpmudev.com\/blog\/wp-json\/wp\/v2\/tags?post=168185"},{"taxonomy":"tutorials_categories","embeddable":true,"href":"https:\/\/wpmudev.com\/blog\/wp-json\/wp\/v2\/tutorials_categories?post=168185"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}