在原子供稿中显示图像 [英] Displaying images in atom feed

查看:67
本文介绍了在原子供稿中显示图像的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在原子文件中显示图像时遇到问题.它不包含Google阅读器,歌剧或Firefox中的Feed中的图片.

I have problems with displaying images in atom file. It doesn't include images in feed in google reader, opera or firefox.

作为起点,我做了清单6中的所有操作.在[Atom 1.0联合格式概述]中,这是行不通的.

As a starting point I did everything like in Listing 6. at [An overview of the Atom 1.0 Syndication Format] But it doesn't work.

更新 热链接保护的图像不是问题.在此处描述:如何在原子供稿中显示项目照片?

Update It is not problem with hotlink protected images. Described here: How to display item photo in atom feed?

后来,我根据此处发布的说明进行了更改.

Later I changed feed according to description posted here.

我添加了:

<media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="path_to_image.jpg" />

但是仍然不起作用

推荐答案

在尝试将图像作为附件包含时,我遇到了同样的问题,但是对我来说,最简单的方法似乎是将包含常规img标签的图像包含到html内容.

I had the same problem when trying to include images as enclosure, but it seemed that the easiest way for me was to include the image with the normal img tag to the html content.

(它也包装在CDATA中,这可能会影响Google Reader处理内容的方式.我一直都在尝试.)

(It's also wrapped in CDATA, which might affect the way Google Reader handles the content. I haven't tried without.)

以下示例适用于我,以使原子供稿图像在Google阅读器中可见:

The following example works for me to make atom feed images visible in Google Reader:

<content type="html">
  <![CDATA[
    <a href="http://test.lvh.me:3000/listings/341-test-pics?locale=en">
      <img alt="test_pic" src="http://test.lvh.me:3000/system/images/20/medium/test_pic.jpg?1343246102" />
    </a>
  ]]>
</content>

这篇关于在原子供稿中显示图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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