featured-images

How to Add Featured Images in WordPress

In this article, I will teach you. How to Add Featured Images in WordPress (also often referred to as Post Thumbnails) are images that represent an individual Post, Page, or Custom Post type. If you create a theme, you can output a featured image in lots of different ways, on your archive tab, in your header, or above a post.

Featured images are features of the WordPress theme. Mostly all WordPress themes come with built-in support for featured images and display them beautifully across various areas of your WordPress site.

featured-images

They’re also helping you build user engagement and increase page views. These images can also be used by search engines and websites of social media and displayed in search results and feed for social media.

Mostly featured images are used for blog posts, but you can also set up featured images for pages and custom post types.

Let’s take a look a how to easily add featured images or post thumbnails in WordPress.

Add Post Thumbnail & Featured Image in WordPress

To add a featured image to a WordPress post, you can simply edit or create a new blog post.

In the content editor, you will find the image tab in the right column.

featured-images

You need to click the ‘Set Featured Image‘ area, and this will bring up the WordPress Media Uploader popup.

After this, you can upload an image to your computer or use an existing image from your media library. After you have selected the image, click the Set Featured Image button.

featured-images

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

You can now save or publish your post and preview it to see how it looks on your live website.

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

Everything you can do is use Google Image Search and use any image from the internet. These images are protected by copyright laws, and their use without proper permission can cause legal problems.

Thankfully, there are a number of tools that you can use to find free images for your blog posts.

Our top choices are the following:

Shutterstock – They have a few free pictures, but the real value comes from their paid plans that offer you access to hundreds of high-quality photos, illustrations, drawings, videos.

Unsplash – A widely known online resource for publishing high-resolution images that you can use on your website and other projects.

Negative Space – Another well-organized collection of copyright-free images.

New Old Stock – Collection of vintage photos from public archives.

featured-images

Note: Both of these sources have high-quality images, which means they are massive in file size and size. You’ll need to optimize your web images before using them as featured images.

Featured images are handled for your WordPress theme. To adjust how your theme displays the featured images, you will need some simple CSS or WordPress coding skills.

If you’re familiar with coding, continue reading for more tips.

If your theme doesn’t really support featured images, you will not see the option to add a featured image to the content editor.

To add featured image support to a WordPress theme, then you also need to add this line of code to the functions.php file of your theme:

add_theme_support( 'post-thumbnails' );

This code will make it possible to endorse the featured image for posts and websites. You can now go to the posts or page block editor, and you’ll see the featured image option available.

However, when you set a featured image, it will not be displayed automatically in your WordPress theme. To display the images in your theme, you need to edit your templates and add this line of code where you want to display the featured image:

<?php the_post_thumbnail(); ?>

The files you add to the above code will vary based on your theme. You’re likely to want to include the code within your post loop.

The above code is the most basic function you’ll need to support featured images and show featured images in your theme. You must add this code line to your functions.php file in order to set the image size for the featured images you upload.

set_post_thumbnail_size( 50, 50);

The parameters for set post thumbnail size are as follows: width, height.

You can also set additional image sizes to be used with the post thumbnail() function. For example:

// Image size for single posts
add_image_size( 'single-post-thumbnail', 590, 180 );

In this instance, we have added a new image size called single-post-thumbnail with a height of 590px and 180px.

If we want to use this image size in our theme, we will still need to add it to the appropriate theme file.

If you’ve previously uploaded featured images, but still appear in some other size, then you need to regenerate thumbnails and image sizes for older posts.

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

<?php the_post_thumbnail( 'single-post-thumbnail' ); ?>

This is a broken-down version of the full functionality. There are a lot of other things you can do with the featured images.

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

Usually, beginners add a featured image and then add the same image to the content of the post editor.

Everything you have to do is delete the image from the content area and then use the featured image meta box to add a featured image. 

2. What is the difference between a cover image and a featured image?

Cover images are used in the content of your posts or pages. Normally, they are used to separate the different sections of a lengthy page or post.

The featured image is the representative image of the article. It appears before or alongside the content, but not inside the actual article.

3. How do I view featured images next to recent blog posts?

The WordPress Block Editor comes with a ‘Latest Posts’ block that allows you to view recent posts with post thumbnails.

You can also view recent posts with thumbnails in sidebar widgets using the Recent Posts Widget Extended plugin.

4. How to remind authors to add featured images in WordPress?

Featured images are seen prominently on your homepage, blog page, and other archive pages.

If you or another author on your blog has forgotten to set one and published a post, it will appear without a featured image. This is going to start looking poor and inconsistent, which is not good for the user experience.

You can install and activate the Require Featured Image plugin, which will show a notification when someone tries to publish a post without a featured image.

featured-images

If you have any questions or queries about this article, please comment below, and we’ll get back to you. Check more daily updates to get subscribe to our website and also you can get informational articles and much more etc.

About webs360

Webs360 is to provide the best content to our readers by covering useful Guides and informative topics on Tech, Blogging, Android, Games, WordPress, Mobile, Soft360, Learning Point...

Leave a Reply

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

0 Shares
Share via
Copy link
Powered by Social Snap