Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to add the image as part of RSS feeds

Tags:

rss

I have added the Title, Title link and description in RSS feeds. But unable to add the Image as part of the RSS feeds.

Please guide me how I can include the image within the tag and display them in the RSS feeds.

Regards, Gourav

like image 780
gourav Avatar asked Mar 28 '11 09:03

gourav


People also ask

Do RSS Feeds include images?

Now, while the content of your RSS feed may include images, the first image or featured image doesn't usually make it through to the feed readers.

Is it possible to customize your RSS Feeds?

Fortunately, you can customize your RSS feed relatively easily by adding a few lines of code. Note that this method may not be suitable for beginners as you'll need to access your child theme's functions. php file. However, most intermediate users should be able to follow the instructions below.


1 Answers

Wrap your description in CDATA comments and insert the images as HTML <img> tags.

TechCrunch have examples in their feed that you could work from: http://feeds.feedburner.com/TechCrunch

For example from their current feed the first item about UK Entrepreneurs using the following description tag:

<description>
    <![CDATA[
        <img src="http://eu.techcrunch.com/wp-content/uploads/startupbritain.jpg" alt="" />
        This morning in London, the UK's answer to <a href="http://www.whitehouse.gov/issues/startup-america">
        Startup America</a> launches, titled - guess what? - <a href="http://www.startupbritain.org/">Startup Britain</a>.
        That similarity aside, the initiative has been put together by a number of existing UK entrepreneurs and 
        is not being backed by any government money, unlike the Obama initiative. Instead, we have here a 
        ground-up entrepreneur-led initiative which is seeing over 60 leading brands offer services to 
        up-and-coming startups in the UK. This is not specifically about tech startups - but it may well appeal to that sector. 

        The campaign is being launched by Prime Minister David Cameron, who is known to be very pro-enterprise. 
        The UK has 270,000 businesses that start up every year but many fail due to a lack of support. So in 
        effect the Startup Britain initiative is doing a few things much more differently. It's offering a 
        package of discounts and free trial on business services like insurance, broadband, advertising, 
        office space and more. The claim is that this amounts to over £1,500 in value for every startup 
        company in Britain. Startup Britain is a portal site to a package of these services. 
        <img alt="" 
             border="0" 
             src="http://stats.wordpress.com/b.gif?host=techcrunch.com" 
             width="1" height="1" />
    ]]>
</description>
like image 176
Treffynnon Avatar answered Sep 27 '22 22:09

Treffynnon