My theme uses a custom template for image shortcodes that enables js-powered lazy loading and a zoom overlay. That technique works fine in in web browsers, but is buggy in RSS readers, rendering duplicate images and markup that’s supposed to be hidden.
Is there a way to load a different template for RSS?
I tried setting a scratch flag at the beginning of the RSS template and checking for it in the image template, but I can’t seem to access it.
When you include {{< image >}} in your markdown, the image.html template will be used for HTML rendering, and image.rss.html will be used when creating the RSS feed.
I found it by searching through closed GitHub issues. I suspected it was possible, and wanted to confirm before trying. Then I tested before letting you know.