WordPress: Add thumbnails in RSS feeds

WordPress has an RSS feed that your visitors can subscribe to get latest updates about new posts. By default, the WordPress RSS feed does not include featured thumbnails that might be part of your theme. Do you want to show thumbnails in RSS feeds? By adding this function to your theme’s functions.php file, you can display a featured image in the RSS feed if the post has one.

function rss_post_thumbnail($content) {
  	global $post;
   	if(has_post_thumbnail($post->ID)) {
   	    	$content = '<p>' . get_the_post_thumbnail($post->ID) .
   	    	   	   '</p>' . get_the_content();
   	}
   	return $content;
}
add_filter('the_excerpt_rss', 'rss_post_thumbnail');
add_filter('the_content_feed', 'rss_post_thumbnail');