How to Add Featured Image to WordPress RSS Feed Without Plugin?

RSS Stands for Really Simple Syndication. Basically, RSS is used for different purposes. RSS Feed is used by millions of users to track their favorite websites. Developers use it to send the latest post as the newsletter to their users using different platforms like MailChimp, Aweber, etc.

Generally, People save the web content from the respective website to Feed Reader like Feedly, Inoreader, etc. to read it later and in an organized form and get the latest update from the blog where they have subscribed from. Normally, website feed is like www.wplogout.com/feed or www.wplogout.com/rss

RSS Feed with Images Example

So, Let’s go to the step to add featured image in RSS Feed

Step 1: Go to your Dashboard (yoursite.com/dashboard)

Step 2: Go to Appearance > Editor

Custom Code to Add Featured Image to WordPress RSS Feed Without Plugin using Editor
Appearance>Editor

Step 3: Select the functions.php and open it

Step 4: Please Backup your functions.php code into text editors like Notepad, Notepad++, Brackets or any IDE you like. If in case your code doesn’t work then you can paste the previous code.

Step 5: Go to the bottom of the functions.php and paste the following code and save it.

Step 6: Before posting any code, don’t forget to do comment usually starting with // just below in the image so that it will be easier for future preferences.

// Custom Code featured image thumbnails in WordPress RSS Feeds
function wplogout_post_thumbnails_in_feeds( $content ) {
    global $post;
    if( has_post_thumbnail( $post->ID ) ) {
        $content = '<p>' . get_the_post_thumbnail( $post->ID ) . '</p>' . $content;
    }
    return $content;
}
add_filter( 'the_excerpt_rss', 'wplogout_post_thumbnails_in_feeds' );
add_filter( 'the_content_feed', 'wplogout_post_thumbnails_in_feeds' );

Step 7: Test whether this code and your feed are working or not. To check please visit RSS Preview Web sites like Feedbucket or CodeRedCorp. It will display the featured image in the RSS feed as below.

Conclusion

I have tested this above code in Genesis Theme where this code works perfectly. I have used this code to Add Featured Image to MailChimp RSS to Email with Post Summary while sending the newsletter to the subscribed users.

If your and Non-technical user than you can follow this tutorial using Plugin.

Recommend: How to Add Featured Image to WordPress RSS Feed Using Plugin?

If you have any problem regarding adding images to RSS feed then feel free to comments below.

Share:

GET 100+ FREE SEO TOOLS

Quickly access over 100+ popular SEO/Marketing tools to Boost your website traffic.

Thank you for subscribing. Check your Email(Didn't receive? check Spam Folder)

Something went wrong.

I am obsessed with WordPress and write articles about WordPress Speed Optimization, SEO, Blogging. I mostly publish tutorials on GeneratePress and GenerateBlocks.

Leave a Comment