I want the images in my RSS feed to be displayed so that if the feed is taken into Facebook my page will show the image with it.
This is my RSS feed:
<title>Title</title>
<link>www.website.com</link>
<guid>www.website.com/1/</guid>
<description>Description</description>
</item>
Do I add
<image></image>
and just stick the URL in? Or should I use
<media:thumbnail>
?
I don't want the image to be the main content but instead have it show as thumbnail preview like when sharing a webpage on Facebook.
–
–
–
Convert the
img
tags to escaped HTML entities:
<description><img src="http://example.com/path/to/image"></description>
Wrap the description content within a CDATA section:
<description><![CDATA[<img src="http://example.com/path/to/image">]]></description>
If you're thinking of using the <media:thumbnail>
field, it's more for showcasing a thumbnail representation of an object enclosed in <media:content>
.
This element allows you publish a thumbnail image of your image or video. For Media RSS aware readers, this is a key feature, since readers are more likely to click on your media content if it has a nice shiny thumbnail. You’ll definitely need to give the URL attribute of your thumbnail image, which is all you basically need to do in order to include a thumbnail image.
Use Media RSS - Webmonkey
–
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
site design / logo © 2019 Stack Exchange Inc; user contributions licensed under cc by-sa 3.0
with attribution required.
rev 2019.6.17.34003