The WPFolks app is out on iPhone and Android. Free, no ads. Download on the App Store Get it on Google Play
Skip to main content
Login Join
Snippet · PHP

Automatically Add Featured Image to RSS Feed

Shared by Amit Dholiya · July 13, 2026

25 views
1 upvote
Back to Snippets

Show the featured image at the top of RSS feed content.

Steps

  1. Open functions.php.
  2. Add the code below.
  3. Save the file.

Done — RSS readers will display featured images.

function rss_featured_image($content) {
    global $post;

    if (has_post_thumbnail($post->ID)) {
        $content = get_the_post_thumbnail($post->ID, 'full') . $content;
    }

    return $content;
}
add_filter('the_excerpt_rss', 'rss_featured_image');
add_filter('the_content_feed', 'rss_featured_image');
Know a different way to do this? Add your approach as a variation so folks can compare them side by side.
Submit a variation

0 comments

Proudly supported by