WordPress featured image In RSS

How to Include WordPress Featured Image in RSS? Easy Guide

Last update on:

WordPress is a popular platform for beginners to start their blogs or websites. It offers many free features. But some things you might not find built-in. If you use an RSS feed on WordPress, you might already know that featured images are not included in your RSS feed. But having a WordPress featured image in RSS can be very helpful to set a strong presence online.

So how do you solve this problem? Read along and find an easy step-by-step guideline on how to include WordPress featured images in RSS.

What is WordPress RSS Feed?

RSS means Really Simple Syndication. RSS uses different feed formats on the web so that it can publish blogs in the form of a structured XML file for syndication. This file is called RSS feed. This allows all content to publish as news or headline and automated data syndication.

Why will You Send WordPress Featured Image to RSS?

You will find many reasons to add WordPress featured image in RSS. Customizing your RSS feed can be intriguing indeed. Some features that you will get as you send WordPress featured image to RSS feed includes:

  • You can set up an RSS-driven campaign in your MailChimp. MailChimp is an email marketing system and an automated platform. It will require image tags to set RSS driven campaign, in case you want to display pictures in your email campaign.
  • If you share images on your RSS feed, many feed readers will be keen to pull in pictures or tag them for the post. You can even get the attention from Flipboard, Feedly, and other significant feed readers.
  • You will find other features like feed reading desktop applications. FeedReader, RSS Owl, etc. are typical to find.
  • Now, this one might seem simple but is quite appealing and hard to resist. When you display images side-by-side with your news or blog, they will appear on Google news too. There is a catch, though. You have to make sure your pictures are relevant to your blog, and your website has to be on Google news.

How to Add WordPress Featured Images in RSS?

There are two possible ways to insert WordPress featured images in your RSS feed. One is with plugins, and the other is without. With or without plugins, you can do both as it pleases you. We will be sharing a step by step guide that includes both of these methods.

You can add as many WordPress featured images in RSS feed as you want. Just make sure to follow these steps as shown.

How to Show Featured Image in RSS without Plugins

Step 1

This method requires your coding skills. Do not worry if you are not an expert. We are here for that.

You can go for the most comfortable option and add your code directly to the theme’s functions.php file. Unfortunately, this is not the safest choice, hence, not a wise action. Instead, add the code via a child theme.

Read our guide on how to create a child theme step by step guide.

You can also use a plugin for this. My Custom Functions can be a good option for that. After finding the child theme’s functions.php file or installing the plugin, you can move forward to the next step.

Step 2

Once you have found your child theme’s functions.php file, type in the following code at the bottom. But before you do that, as a beginner you should always make sure to have a backup of any file you edit. In this case, backup your functions.php file before inserting this code. You can also add the below codes in the My Custom Functions plugin, add the code there.

function featuredtoRSS($content) {
global $post;
if ( has_post_thumbnail( $post->ID ) ){
$content = '' . get_the_post_thumbnail( $post->ID, 'thumbnail', array( 'style' => 'float:left; margin:0 15px 15px 0;' ) ) . '' . $content;
}
return $content;
}
add_filter('the_excerpt_rss', 'featuredtoRSS');
add_filter('the_content_feed', 'featuredtoRSS');

Step 3

However, this code is for general use only. Many who work with MailChimp RSS have faced trouble using this code. We have an easy escape for that too. If you want to use a code specifically for MailChimp RSS, Mailer lite newsletter RSS, Feedburner, etc to email converter, this code below will be the best of all. Instead of the previous code, just copy and paste this one below to your child theme’s functions.php file, and it’s solved.

// Add namespace for media:image element used below
add_filter( 'rss2_ns', function(){
  echo 'xmlns:media="http://search.yahoo.com/mrss/"';
});

// insert the image object into the RSS item (see MB-191)
add_action('rss2_item', function(){
  global $post;
  if (has_post_thumbnail($post->ID)){
    $thumbnail_ID = get_post_thumbnail_id($post->ID);
    $thumbnail = wp_get_attachment_image_src($thumbnail_ID, 'medium');
    if (is_array($thumbnail)) {
      echo '<media:content medium="image" url="' . $thumbnail[0]
        . '" width="' . $thumbnail[1] . '" height="' . $thumbnail[2] . '" />';
    }
  }
});

Step 4

Here is how it should look once you have entered the code. Click on “Only run on site front-end”. Now, save your code and activate it.

code implement

Step 5

This code is for medium-sized thumbnails to add to your RSS feed. You will see thumbnails on your RSS feed as the one shown below.

Medium-sized thumbnails work the best in most cases. But if you want to display a larger thumbnail, you can change the code to thumbnail or full.

Here it ends if you want to add WordPress featured image in RSS manually. You will be able to share pictures, and feed readers will be seeing them after that. Sometimes, readers may not be able to see them if the RSS management system caches your feed.

In that case, wait until it updates. Everything will sort out afterward. Ping Feedburner if you want to update immediately.

How to Add WordPress Featured Image in RSS via the Plugin?

If you don’t find much confidence in coding, we suggest installing a suitable plugin to add WordPress featured image in your RSS feed. You will find many of them that will be there to help without any mess. Plugins like, Send Images to RSS or for MailChimp users Featured Images in RSS for Mailchimp Is of great help.

Featured Images in RSS for Mailchimp
  • First, install your plugin.
  • Find your WordPress admin dashboard.
  • Go to Settings.
  • Find the plugin that you installed for adding images to the RSS feed.
  • Choose your preferred size and alignment for thumbnails.
  • Click “Save Changes” and done.

Top 3 Send images to RSS plugins

As mentioned earlier, you can add images with or without a plugin. It depends on you what you prefer.

However, you can’t deny how easy and effective it is to use plugins. They always have made WordPress functionalities more fun and user-friendly.

Also, not all the blogs and websites can insert images in your RSS without a plugin. Many websites cannot send or share photos that are too large for emails. That’s where the images to RSS plugin comes to help.

They work as a bridge between them. They replace your large website or blog image with a smaller one suitable for the email. This way, clients can handle emails more quickly.

We are recommending a list of the top plugins that could be used in this case. You can find them in free versions along with the paid versions too.

Conclusion

RSS feed is vital to building up a better business appearance and website with WordPress. WordPress can automatically generate your RSS feed, and it’s great to assure an upgraded version of your blog or website. Adding feature images will boost up the process in ways that you can hardly imagine. And thanks to the available plugins, it’s a lot simpler for beginners now. Follow the guide provided and enjoy many more unique features that RSS feed has to offer you.

What’s your Reaction?
+1
0
+1
0
+1
0
+1
0
+1
0
+1
0
+1
0

Author

  • Palash Talukder

    Palash Talukdar is a digital marketer & the founder of WP Basic Pro. He has been building and managing WordPress websites for 5+ years. He loves to write about WordPress, SEO, marketing, productivity, and web performance.

    https://bd.linkedin.com/in/palashpro [email protected] Talukder Palash
Subscribe
Notify of
guest

This site uses Akismet to reduce spam. Learn how your comment data is processed.

0 Comments
Inline Feedbacks
View all comments
Saeed Khosravi