Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I add an image to an item in RSS 2.0?

Tags:

image

rss

Is there a way to send only an Image with a link and some alt text for each item in an RSS feed?

I looked at the enclosure tag but this is only for videos and music.

like image 690
sanders Avatar asked Apr 01 '09 12:04

sanders


People also ask

Can RSS feeds have 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.

What is an enclosure tag?

<enclosure url="https://www.w3schools.com/media/3d.wmv" length="78645" type="video/wmv" /> </item> </channel> </rss>


1 Answers

The enclosure element can be used to transmit pictures. The RSS 2.0 spec is quite clear about that, saying that the type is a MIME type. It does not say it is restricted to audio or video.

Here's an example: a set of photo feeds from Agence France Presse

like image 84
Dave Winer Avatar answered Sep 20 '22 23:09

Dave Winer