Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Certain images remain as attachments #1389

Open
AndyM48 opened this issue Oct 24, 2024 · 3 comments
Open

Certain images remain as attachments #1389

AndyM48 opened this issue Oct 24, 2024 · 3 comments

Comments

@AndyM48
Copy link

AndyM48 commented Oct 24, 2024

I am not sure why certain images are only shown as attachments instead of being displayed in the reader pane?

As an example:
https://i.guim.co.uk/img/media/799c0e3e1f1a6314ad22423b7bf8aa4ed1afd174/0_32_7952_4771/master/7952.jpg?width=460&quality=85&auto=format&fit=max&s=1327e7c6805327ee68766f935b646af6

@AndyM48 AndyM48 changed the title Certaim images remain as attachments Certain images remain as attachments Oct 24, 2024
@lwindolf
Copy link
Owner

Can you please provide the feed also (or a snippet of it)? Because the rendering depends on the mime type of the attachment.

@AndyM48
Copy link
Author

AndyM48 commented Oct 25, 2024

Sure, here you go:

Feed: https://www.theguardian.com/uk-news/rss

Item: https://www.theguardian.com/uk-news/gallery/2024/oct/25/chogm-2024-king-charles-and-queen-camilla-receive-royal-welcome-in-samoa-in-pictures

Image (1/2): https://i.guim.co.uk/img/media/f3016a202c34b502ef4147bab86cd625713a6e83/0_251_3808_2286/master/3808.jpg?width=140&quality=85&auto=format&fit=max&s=424d39dc49fba266ac8308da905dbabd
Image (2/2): https://i.guim.co.uk/img/media/f3016a202c34b502ef4147bab86cd625713a6e83/0_251_3808_2286/master/3808.jpg?width=460&quality=85&auto=format&fit=max&s=c4144b4894cec99db47e316a57fab7c2

2024-10-25_10-31

@lwindolf
Copy link
Owner

Ah yes. That's a bit of logic. You can find it in xslt/item.xml.in. All images contained in the <description> of the RSS <item> and additionally any Gravatar image and MediaRSS thumbnails are displayed.

All images provided by the feed as <media:content> are always provided as attachment only. The reason for this choice is that those images are often the same but with different dimensions. Showing all of them never makes sense, choosing the right one is hard and feeds that do provide them usually provide a good default image.

So all in all given the feed the code works as intended.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants