WordPress Featured Image | How to Use them on your WordPress Site

WordPress Featured ImageAs a website owner, you surely know how vital images are for your WordPress website. Featured images, also known as Post thumbnails are no different as they are useful on any WordPress blog. They not only improve SEO on your site but also make your site more appealing.

So what exactly are featured images and how can you add them to a WordPress post? This guide to featured images answers these in detail. Sit back while we walk you through all of it.

Contents:

What is a Featured Image?

Put simply, Featured images are images used to represent a post or a page

Now, where a featured image appears depends entirely on your active WordPress theme. It can appear on your blog page as a post thumbnail image. It could also be displayed at the top of individual posts, making it the first thing a visitor sees.

How To Set Featured Images In WordPress

Setting up a WordPress featured image is quite easy. After logging into your admin panel, you can access your WordPress dashboard. Go to ‘Posts’, select a post to which you want to add the featured image and click ‘Edit’ to open the post editor.

Edit post - WordPress featured image

On the bottom-right corner of the page, you will see the ‘Featured image’ tab. Click on the ‘Set featured image link.

Set image feature

This will take you to the Media uploader. You can either select from your blog images on WordPress media library, or upload an image from your files.

upload files

Select the image you want to use and click the ‘Set featured image’ button at the bottom-right of your WordPress dashboard.

Media Library

Your featured image will be added to the post.

WordPress featured image is added

Next, click ‘Update’ or ‘Publish’ to save your changes. Your featured image is set. Next, you can preview the changes you just made using the ‘Preview Changes’ button. Now where the image will be displayed is determined by your theme developer. In the test site we used, the image is displayed at the top of the post.

WordPress featured image successs

If that’s not the case in your site, then you will likely find the feature image in your homepage, your blog page, or any other page that displays a list of your posts. It all depends on your theme settings.

Setting Featured Image Size

Now that you know how to set a WordPress featured image, how can you set or change their sizes? Well, it’s not difficult. Usually, after uploading an image, the image is automatically resized and made available as large, medium, or thumbnail size images. Of course, there’s also full size which is the original size of the image.

Sometimes, these image dimensions may not cut it for you. In that case, you can make some changes to your image settings to create additional image sizes. To do this, head on to your ‘Settings’ and click on ‘Media’. There, you will see the standard image sizes that have been set by WordPress.

Setting image sizes

Put in the sizes you prefer. After that, scroll down and click on ‘Save Changes’. That’s all you need to do. Now you can go ahead and upload your featured image.

Note that these new image sizes will only apply to image files uploaded after this change. You would have to resize previous images.

How to Add Featured Image Support to Your Theme

While most WordPress themes support featured images, there are rare cases where a theme doesn’t. If this is the case for you, do not panic. You can easily add the feature by including some lines of code in your theme’s function.php file. The codes also set how a featured image appears.

Remember to backup your WordPress site before making any changes.

To get started, go to Appearance >> Theme Editor and click on your theme’s function.php file.

Appearance >> Theme editor

Add the following line of code:

add_theme_support( 'post-thumbnails' ); );

This automatically enables featured image support for posts and pages. However, this does not mean the image will be displayed.

To display featured images on your WordPress theme, you’ll need to edit your theme and add this line of code at the point where you want to display the featured image.


<?php the_post_thumbnail(); ?>

Note: If you want to display this image inside your post content, then you have to edit a file usually called single.php. However, it may differ based on your installed theme. When you locate this file, ensure you add it within your post loop, which looks like the code snippet below.

 

<?php 

if ( have_posts() ) {

while ( have_posts() ) {

the_post(); 

//

// Post Content here

//

} // end while

} // end if

?>

In the theme file, there will be a lot more lines of code for displaying post title, post category, author name, and other such items within the loop.

Add the thumbnail display code just above these lines, as you usually display the featured image first, before other items.

When done, hit ‘Update’. You should now have your feature image displayed on your posts.

You can also customize the featured image size. Add the following line of code to the function.php file.

set_post_thumbnail_size( 600, 400);

The first and second number within the bracket represents the width and height respectively. If you want a larger image size, you can enter a larger value pair, such as “900, 600”.

Where to Get Images to use as Featured Images

To get the best results with featured images, you need a way to get relevant images for each post. However, to avoid copyright issues, you should not simply lift images off the internet. You have to use copyright-free images. Such kinds of images are found on sites like:

These websites provide WordPress users with high resolution images. Out of the box, these images can bring your posts to life. You may however use design tools to make them even more interesting. For example, you can add the name of the post to the image, like we do at FixRunner.

Conclusion

WordPress Featured images are used to add value to your content as they help make your content shine. They also help in organizing and presenting your posts within pages that list them, such as your blog or homepage.

Additionally, when you use featured images correctly, they help to build brand awareness for your business.

This article has shown you how to set featured images for posts. If your WordPress theme does not support it, we have shown how to add support for them.

For more tips on how to improve your WordPress site, please visit our WP College.

 This post was written by FixRunner Team

The FixRunner team - an awesome combination of WordPress experts, and technically savvy content creators - are determined to give the WordPress Community a solution to every problem. This diverse team - spanning 3 continents, young and mature, ladies and gentlemen - work seamlessly to keep the wheels running on WordPress sites across the globe.

Last edited by: FixRunner Team