How to display an image in a Views RSS feed I am trying to display an image in a Views RSS feed.


I have added the following fields to my View: field_image,
field_title, field_twitter (These fields come from my node).
I then set all fields to "Exclude from display".
I then create a new field in Views called "RSS Content".
I then place tokens for all the fields (from step 1) into "RSS Content".
Finally, I go to "Views >> Show >> Settings". In the drop down menu for "Description field", I select "RSS Content".


When I look at my RSS feed, the image field is displayed like this:

    &lt;description&gt; 
&amp;lt;img src=&amp;quot;http://example.com/sites/files/nodes/content/images/intro/two-hearts-1312984-1280x960_0.jpg&amp;quot; /&amp;gt;
&lt;/description&gt;


How do I get the image to display properly, instead of the image tags being escaped?
First add the Media RSS namespace to your views-view-rss.tpl.php

&lt;rss version="2.0" xml:base="&lt;?php print $link; ?&gt;"&lt;?php print $namespaces; ?&gt; xmlns:media="http://search.yahoo.com/mrss/"&gt;


Then add the  tag to your views-view-row-rss.tpl.php

&lt;media:content url="&lt;?php print image_style_url('my_img_style_id', $node-&gt;field_image['und'][0]['uri']); ?&gt;" type="image/jpeg" medium="image" height="800" width="600" lang="en" /&gt;


Lastly make the field data available to your theme's template

function mytheme_preprocess_views_view_row_rss(&amp;$vars) {
  $view     = &amp;$vars['view'];
  $options  = &amp;$vars['options'];
  $item     = &amp;$vars['row'];

  // Use the [id] of the returned results to determine the nid in [results]
  $result = &amp;$vars['view']-&gt;result;
  $id   = &amp;$vars['id'];
  $node   = node_load( $result[$id-1]-&gt;nid );
  $vars['node'] = $node;
}


Original article: https://blog.sam-thompson.info/images-in-drupal-rss-feed-without-additional-modules/