Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

Is there any way to show an image for RSS feeds in my WordPress page? Currently the default WordPress RSS feeds will only show the text of feeds from other sites. How can I make my site show a thumbnail image of RSS feeds of the other sites?

share|improve this question
add comment

4 Answers

SimplePie, which ships with WordPress, does support images in feeds. Please see the SimplePie Reference if you need to look for specific functions regarding images.

If you want to display images from feeds on your own site, you could for example create a plugin containing a custom widget that reads a feed for images. For example with the get_feed_tags() function to look for IMG-tags. Those can be displayed by the widget then.

Be carefull not to inject content into your site you do not want to inject because of security reasons etc. .

share|improve this answer
add comment

While researching another question, I found the Anyfeed Slideshow plugin, that shows images in RSS feeds. I don't know how good it is displaying both text and images, but if your feed is image-focused (like a Flickr feed), this will probably do what you want.

share|improve this answer
add comment

I also was searching for adding thumbnails to my feeds. I found a solution which I'm not sure if it is a best way, but it works. I used RSS Image Widget plugin, and made some changes to the code:

$desc = $item->get_description();
if(strlen($desc)>50)
   $desc = wp_html_excerpt($desc, 50).' ... ';
$blog_title = $item->get_title();
if(strlen($blog_title)>45)
   $blog_title = wp_html_excerpt($blog_title, 45).' ... ';

echo '<div class="rss_image">
      <a title="'.$item->get_title().'" href="'.$item->get_permalink().'"><img src="'.get_bloginfo('wpurl').'/wp-content/cache/rss_image_cache_'.date('n').'/'.$image_thumb.'" alt="'.$item->get_title().'" /></a>
        <h5><a title="'.$item->get_title().'" href="'.$item->get_permalink().'">'.$blog_title.'</a></h5><p>'.$desc.'</p>
    </div><br />';

Also it's worth mentioning that on the source blog images were included in the feed.

share|improve this answer
    
That’s not an image from the other site. –  toscho Nov 5 '12 at 3:49
add comment

I hope you'll get you answer here

http://www.strangework.com/2010/02/25/how-to-add-a-post-thumbnail-to-an-rss-feed-in-wordpress/

share|improve this answer
    
it doesnt work to me –  Beginner Pogrammer Oct 18 '10 at 6:52
    
I believe the original poster wants to know how to show images from external feeds on his site (in a sidebar), not how to add post thumbnails to your own feed that you send to others. –  Jan Fabry Oct 19 '10 at 7:06
    
actually i handt tried it. i suggested because i had a link. i'll try it and will do necessary changes. then will tell you the solution. –  articlestack Oct 19 '10 at 10:34
    
see at the rss feeds, i want to show image on that –  Beginner Pogrammer Oct 20 '10 at 1:40
    
did u check my link? –  Beginner Pogrammer Oct 25 '10 at 2:52
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.