关于RSS项目描述的图像

时间:2020-12-07 04:54:17

I'm starting with RSS development, for my new site, but I want to know if there is any way to put images on the description of a item, something like this:

我开始使用RSS开发,我的新网站,但我想知道是否有任何方法可以将图像放在项目的描述上,如下所示:

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

And if it's possible, which feed readers will be able to visualize it clearly and perfect.

如果可能的话,哪些阅读器将能够清晰和完美地将其可视化。

1 个解决方案

#1


12  

You can have a reference to an image inside CDATA (which is typically done). Example:

您可以在CDATA中引用图像(通常已完成)。例:

<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 reference (which may be to an image) is allowed in the enclosure tag in RSS 2.0 (see the specification for details, as additional information must be provided. More typically this is used to link to the mp3 for podcasts.

另一种方法是在RSS 2.0的机箱标签中允许一个引用(可能是图像)(有关详细信息,请参阅规范,因为必须提供附加信息。更常见的是,这用于链接到播客的mp3。

#1


12  

You can have a reference to an image inside CDATA (which is typically done). Example:

您可以在CDATA中引用图像(通常已完成)。例:

<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 reference (which may be to an image) is allowed in the enclosure tag in RSS 2.0 (see the specification for details, as additional information must be provided. More typically this is used to link to the mp3 for podcasts.

另一种方法是在RSS 2.0的机箱标签中允许一个引用(可能是图像)(有关详细信息,请参阅规范,因为必须提供附加信息。更常见的是,这用于链接到播客的mp3。