Currently, the RSS parser while parsing RSS2 feeds gets the item image/thumbnail by finding the first <img> element in the <content> (reference in RssHelper.kt), but some sites may already provide the thumbnail in an <enclosure> element inside the item. This leads to no thumbnails or wrong thumbnails if the site doesn't include the image in the <content> but do provide it in the <enclosure>.
I think the app would handle the thumbnails better by giving priority to the first <enclosure> (if present), and then using the current method if no <enclosure> is found in the item. The same applies to Atom feeds with the <link rel="enclosure"> element.
For reference, an <enclosure> element can be like this:
1. Environment
2. Describe the feature request
Currently, the RSS parser while parsing RSS2 feeds gets the item image/thumbnail by finding the first
<img>
element in the<content>
(reference inRssHelper.kt
), but some sites may already provide the thumbnail in an<enclosure>
element inside the item. This leads to no thumbnails or wrong thumbnails if the site doesn't include the image in the<content>
but do provide it in the<enclosure>
.I think the app would handle the thumbnails better by giving priority to the first
<enclosure>
(if present), and then using the current method if no<enclosure>
is found in the item. The same applies to Atom feeds with the<link rel="enclosure">
element.For reference, an
<enclosure>
element can be like this: