How to add selected images or publish thumbnails in WordPress

Selected images, also known as post thumbnails, are a well-known WordPress feature that most themes support.

They are the main image for your blog posts and often appear next to the headline on your homepage and on social media. All common WordPress themes have built-in support for selected images.

In this article, we are going to show you how to easily add selected images or publish thumbnails in WordPress.

Beginner's Guide to Selected Images in WordPress

Selected images are a WordPress theme feature. Almost all WordPress themes have built-in support for selected images and display them in different areas of your WordPress website.

Preview of featured images in a typical WordPress blog

As humans, we find visual elements more appealing than simple text. You can use selected images to make your blog pages more attractive.

They also help you improve user interaction and increase page views. Search engines and social media websites can also use these images and display them in search results and social media news feeds.

Most of the featured images are used for blog posts. However, you can also set featured images for pages and custom post types.

Note: Selected images are not the same as covers. See the difference between cover photo and image in WordPress.

Let's take a look at how to easily add selected images in WordPress.

Adding Post Thumbnail or Featured Image in WordPress

To add an image to a WordPress post, just edit or create a new blog post.

In the content editor, you will find the "Selected image" tab in the right-hand column.

Selected image area on the screen after editing

You need to click on the "Set Selected Image" area. The WordPress Media Uploader pop-up will appear.

From here you can upload a picture from your computer or use an existing picture from your media library. Once you've selected the image, just hit the Set Selected Image button.

Set a featured image

WordPress now shows a preview of the featured image in the right column. However, the actual image featured would look different depending on your WordPress theme.

You can now save or publish your post and preview it to see how the featured image will look on your live website.

Depending on the settings set by your theme developer, your chosen image will automatically appear with your posts.

How do I find selected images and use them effectively?

The next big question that most beginners run into is where to find images to use as featured images.

You can't just use google image search and use images from the internet. These images are copyrighted and using them without permission can cause legal problems.

Fortunately, there are several resources available to help you find free images to use in your blog posts.

Our top favorites are:

  • Shutterstock – They have a few free images, but the real value comes from their paid plans, which allow you to access tons of high quality photos, illustrations, drawings, videos, and more. We use this for the WPBeginner site.
  • Unsplash – A popular online resource that publishes high resolution images for use on your website and in other projects.
  • Negative Space – A well-organized collection of copyright-free images.
  • New Old Stock – A collection of vintage photographs from public archives.
  • Unsplash is a popular free image resource for bloggers

    Note: All of these sources provide high resolution images, which means they are large in file size and dimensions. You must optimize images for the web before you can use them as featured images.

    Selected images are processed by your WordPress theme. To change how your theme displays selected images you will need some basic CSS or WordPress coding skills.

    Once you are comfortable with coding, read on for more tips.

    Theme Developers Guide for Selected Images and Post Thumbnails in WordPress

    The featured image is a popular feature that is supported by almost all WordPress themes. On rare occasions, you may come across a topic that doesn't support featured images, or you may not like the way they handle feature images.

    If so, you can add featured image support or change the way it looks to your theme.

    If you are comfortable with editing WordPress theme files and are comfortable with a little custom CSS, you can do it yourself.

    If your theme doesn't support featured images, you won't see the option to add a featured image in the content editor.

    To add featured image support in a WordPress theme, you need to add this line of code to your theme's functions.php file:

add_theme_support (& # 39; Post Thumbnails & # 39;);

This code enables featured image support for posts and pages. You can now go to Posts or the Page Block Editor and see that the featured image option is checked.

However, if you set a selected image, it won't automatically appear in your WordPress theme. To see selected images in your theme, you'll need to edit your templates and add this line of code where you want to display the selected image:

The files that you will paste the above code into will vary by subject. You want to put the code in your post loop.

Connected: For more information on how themes work, see the WordPress theme hierarchy cheat sheet.

The code above is the basic feature you need to add featured image support and display featured images in your theme. To set the image size for the images you uploaded, you need to add this line of code to your functions.php file.

set_post_thumbnail_size (50, 50);

The parameters for set_post_thumbnail_size are in this order: width, height.

You can also specify additional image sizes to be used with the_post_thumbnail () function. For example:

// Image size for individual posts
add_image_size (& # 39; single-post-thumbnail & # 39 ;, 590, 180);

In this example we added a new image size called Single post thumbnail with 590px with and 180px height.

In order to use this image size in our theme, we still need to add it to the corresponding theme file.

For more information, see our guide on how to add extra image sizes in WordPress.

If you uploaded previously selected images but they are still displayed in a different size, you will need to regenerate thumbnails and image sizes for older posts.

Below is an example of the featured image function with a specific image size.

This is the itemized version of the full functionality. There are many other things you can do with featured images.

FAQs on selected images in WordPress

As a beginner, you may run into questions or problems while using the images featured on your blog. Below are just a few of the most frequently asked questions about featured images.

1. Why does the featured image appear twice in my posts?

Sometimes beginners add a selected image and then add the same image in the content part of the post editor.

All you have to do is remove the image from the content area and only use the featured images metabox to add featured images. For more information on this, please see our article on how to fix images showing up twice in WordPress.

2. What is the difference between the cover picture and the featured picture?

Cover images are used in the content area of ​​your posts or pages. They are usually used to separate different sections of a long page or post.

The selected image is the representative image of an article. It appears before or next to the content, but not in the actual article.

For more information on this, check out our guide on the difference between cover photo and recommended image in WordPress.

3. How will selected images appear next to recent blog posts?

The WordPress block editor includes a "Recent Posts" block that allows you to view recent posts with thumbnails.

You can also view recent posts with thumbnails in sidebar widgets by using the Recent Posts Widget Extended plugin. For more information, see our article on Viewing Recent Posts in WordPress.

4. How can authors be reminded to add an image in WordPress?

Selected images will be featured prominently on your home page, blog page, and other archive pages.

If you or another blog writer forgot to set one and published the post, it will appear without an image selected. This looks bad and inconsistent which is not good for the user experience.

You can install and enable the Recommended Image Required plugin, which will display a notification when someone tries to post a post with no image selected.

Required picture

For more information, see our article on How to Need Selected Images in WordPress.

We hope this article has helped you learn how to add selected images or publish thumbnails in WordPress. You might also want to check out our beginner's guide to image SEO, which shows how to optimize your WordPress images for search engines.

If you enjoyed this article, please subscribe to our YouTube channel for WordPress video tutorials. You can also find us on Twitter and Facebook.

Comments are closed.