Quantcast
Channel: How do I add an image to an item in RSS 2.0? - Stack Overflow
Viewing all articles
Browse latest Browse all 10

Answer by chovy for How do I add an image to an item in RSS 2.0?

$
0
0

In rss 2.0 its as simple as adding an <image><url>...</url></image> tag:

https://validator.w3.org/feed/docs/rss2.html#ltimagegtSubelementOfLtchannelgt

<image> sub-element of <channel> *

<image> is an optional sub-element of <channel>, which contains three required and three optional sub-elements.

<url> is the URL of a GIF, JPEG or PNG image that represents the channel.

<title> describes the image, it's used in the ALT attribute of the HTML <img> tag when the channel is rendered in HTML.

<link> is the URL of the site, when the channel is rendered, the image is a link to the site. (Note, in practice the image <title> and <link> should have the same value as the channel's <title> and <link>.

Optional elements include <width> and <height>, numbers, indicating the width and height of the image in pixels. <description> contains text that is included in the TITLE attribute of the link formed around the image in the HTML rendering.

Maximum value for width is 144, default value is 88.

Maximum value for height is 400, default value is 31.


Viewing all articles
Browse latest Browse all 10

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>