I need to add an image to the RSS feed. So I create a new row plugin for the RSS and it extends RssFields row plugin.

 * Renders an RSS item based on fields.
 * @ViewsRow(
 *   id = "image_field_rss_fields",
 *   title = @Translation("Fields with image field"),
 *   help = @Translation("Display fields as RSS items with an image item."),
 *   theme = "views_view_row_rss",
 *   display_types = {"feed"}
 * )
class ImageFieldForRssFields extends RssFields {

I can select it in the format settings.

FORMAT settings

And it seems that works perfectly when I update the preview, I can see a new field image on every item of the RSS. But when the RSS feed is rendered, it uses the RssFields plugin instead of the ImageFieldForRssFields plugin that is setted.

I debugged it and it seems that always renders the RssFields plugin even if I delete the RssFields plugin, the view tries to locate it.

Am I missing something? How do I have to do to render the correct plugin?


1 Answer 1


There is a patch to add an image as an enclosure field to core here:


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.