How to display item photo in atom feed?

喜你入骨 提交于 2019-12-10 17:29:26

问题


I want to display a photo for each item in atom feed. I used this structure for my entry

<entry>
    <title>TITLE</title>
    <link href="http://page" />
    <id>http://page</id>
    <updated>DATE</updated>
    <summary>DESCRIPTION</summary>
    <content type="image/jpg" 
    src="http://image" />
</entry>

but when adding the feed in Google Reader, it will not display images. What is the best way to do so?


回答1:


For Atom or RSS you need to enable hotlinking to your files for Google Reader to read them, as decribed at:

“HowTo: Allow Google Reader Access To Hotlink-Protected Images” By JP Habaradas on April 27, 2009

Also, you may want to link this question to https://webmasters.stackexchange.com/ as you will need to make .htaccess modification and have Apache Rewrites enabled and configured.



来源:https://stackoverflow.com/questions/8757542/how-to-display-item-photo-in-atom-feed

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!