Showing Featured Images in Your WordPress RSS Feed

    When establishing a new WordPress website, make sure that the main images from your posts appear in the RSS feed. Even if some people consider RSS feeds outdated, they’re still used by various tools. One such tool is Feedly, which helps you read your favorite blogs and share content through Buffer. It’s also handy on your phone while on the go.

    Feedly gathers posts using RSS feeds. So, including main images is essential for subscribers who use Feedly. Otherwise, your posts might seem dull. This could also affect your email newsletters if you rely on automated RSS feeds.

    Adding Main Images to Your WordPress RSS Feed

    Here are two options to achieve this:

    Option 1: Adding Main Images to RSS Feed with Code

    Option 2: Using a Free Plugin to Add Main Images to RSS Feed

    Testing Your RSS Feed

    Option 1: Adding Main Images to RSS Feed with Code

    Step 1

    Consider using a free plugin called Code Snippets. It’s helpful for managing unique code on your site, especially when working with the GeneratePress theme. This prevents the need to modify the functions.php file or deal with technical aspects. After trying Code Snippets, you’ll likely appreciate its user-friendliness.

    Note: If you’re comfortable, follow the steps below to insert the code directly into your functions.php file.

    Step 2

    Create a new Code Snippet through “Snippets → New Snippet.” Assign any name you prefer, like “featured-images-rss-feed.”

    Step 3

    Copy and paste the code below. If adding it to functions.php, insert it at the end. To be safe, create a backup of your functions.php file before making changes.

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

    Step 4

    Here’s a preview of how the snippet should look. Select “Only run on site front-end,” then save and activate the snippet.

    Step 5

    In the code, I used “large” for the picture size. It’ll appear that way in your RSS feed. Adjust it to medium, full, or thumbnail, if preferred. Generally, “large” works well. Check your RSS feed to see the result.

    Option 2: Using a Free Plugin to Add Main Images to RSS


    A helpful free WordPress plugin is “Featured Images in RSS w/ Size and Position.” While I usually avoid additional plugins, this is a solid choice if you’re not comfortable with code. Many users appreciate it – it has over 20,000 installations and a strong rating of 4.7 out of 5 stars.

    Step 1

    Install the free “Featured Images in RSS” plugin.

    Step 2

    Access your WordPress dashboard, click “Settings,” then choose “Featured Images in RSS Feeds.” You can select the main image size and alignment. The available size options (thumbnail, medium, and large) match your WordPress media settings.

    Testing Your RSS Feed

    Note that if you test your RSS feed using Chrome, images may not appear. Chrome omits some elements from RSS feeds by default. For accurate image viewing, test the RSS feed using Firefox, Internet Explorer, or an online RSS feed preview tool. Alternatively, use a feed reader like Feedly. Before testing, clear your website’s cache.

    David Zingmark
    I'm a passionate individual dedicated to shining a spotlight on incredible companies. My goal is is to uncover stories by telling the most complex operations into simplified words, empowering you as a reader to gain better insights and make informed investment and/or business choices.

    Don't miss this

    Fear of missing out?