如何在RSS 2.0中将图像添加到项目? [英] How do I add an image to an item in RSS 2.0?

查看:63
本文介绍了如何在RSS 2.0中将图像添加到项目?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有一种方法可以只发送带有RSS和RSS提要中每个项目的链接和一些替代文本的图像?

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

我查看了enclosure标记,但这仅用于视频和音乐.

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

推荐答案

解决方案之一是在说明中使用CDATA

One of solutions is to use CDATA in description

<![CDATA[
  Image inside RSS
  <img src="http://example.com/img/smiley.gif" alt="Smiley face">         
]> 

请注意,您可能在阻止热链接的网站上遇到了问题.

Note, that you may have a problem with hotlink prevented site.

这篇关于如何在RSS 2.0中将图像添加到项目?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆