How do I add an image to an item in RSS 2.0?

后端 未结 9 848
青春惊慌失措
青春惊慌失措 2021-02-03 23:50

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

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

9条回答
  •  离开以前
    2021-02-04 00:28

    To work with the Mailchimp RSS to email feature, they expect the image to be specified in a element inside . This is their source for the feed item's image macro in their templates.

    Thus, you need to add to the declarations

    xmlns:media="http://search.yahoo.com/mrss/
    

    Then inside the element add

    
    

    Without the extra declaration, the feed is invalid since media:content is not a known element.

提交回复
热议问题