Images on RSS item description

I start by developing RSS for my new site, but I want to know if there is a way to put images in the element description, something like this:

<item> <title>Image Test</title> <link>http://testin.test</link> <description>Some text... <img src="image.jpg"></description> </item> 

And if possible, feed readers will be able to visualize it clearly and perfectly.

+6
xml image rss
source share
1 answer

You may have a link to an image inside CDATA (which is usually done). Example:

 <item><title>June 13 : Cool Clear Waters</title> <link>http://www.whitegrass.com/report.html</link> <description> <![CDATA[<img align="left" hspace="5" src="http://www.whitegrass.com/June 2011/IMGP9201LG.jpg"/> Work a little, play a little, dream into summer, celebrate a great winter gone by, keep movin'... <br />]]> </description> <guid isPermaLink="false">http://www.mcgurrin.com/whitegrass.xml</guid> <pubDate>Tue, 14 Jun 2011 01:32:00 GMT</pubDate></item> 

An alternative is that one link (which may be associated with the image) is allowed in the application tag in RSS 2.0 (see the specification for more details, as additional information must be provided). More typically, this is used to link to mp3 for podcasts.

+12
source share

All Articles