[Android client] Attachments images not showing for some feeds

Hello,

This is my second post on the forum and I’ll again thank you for this great piece of software that is TTRSS.

I was wondering why some of my feeds don’t display attached images in the android client. Most of them do but some don’t. I can see the link to the pictures when I tap the little paper clip under the article but no way to display them on the article list for those feeds.

This one, for example, doesn’t display images as it shoud on the android client : Le Monde.fr - Actualités et Infos en France et dans le monde

All of my feeds have the same settings (“Always display image attachements” enabled and I also tried to enable “cache media” for the feeds without picture) so this doesn’t come from there. Picture height are more than 300 px so I don’t think it’s quality related either.

A kind of workaround is to inline article content but it doesn’t work every time so I’m looking for a cleaner and, most of all, working every time option.

If someone has any idea about that behavior and how to fix it, I’m open to suggestions.

Thanks and have a nice day.

i think the cause here is that this feed doesn’t specify content type (i.e. type attribute) for media:content elements, so tt-rss doesn’t know it’s actually an image, thus it’s not shown inline.

before you ask, trying to guess this stuff by URL (i.e. it ends in a .jpg) is generally a bad idea.

one could write a very simple plugin that would fix this by setting proper content type for this specific feed (and maybe others).

OK. Thank you for your quick answer.

I’m a noob so it will be difficult for me to write a plugin but I saw when going through this forum that there is a tool (RSS-bridge) that could do the job in this case.

Do you think it could work ? I’m thinking about generating a proper feed using RSS-bridge to replace the “bad” original one if I wasn’t clear.

i’m afraid i’ve never personally used rssbridge but i think it could work.

if i have some time to kill i’ll try to make a quick plugin for this feed tomorrow.

Waouh. That would be awesome.

I quickly looked into the other feed that doesn’t behave well and the problem seems to be the same type but not exactly identical.
As you can see

Here, the type is defined not in “media” but in “enclosure”.

If the plugin you have in mind can work things up, that would be great. If not, don’t bother and I’ll try my luck with something like RSS-bridge.

Thanks again

https://git.tt-rss.org/fox/ttrss-enclosure-fix-type

note that this needs most recent tt-rss code because it adds the plugin hook this plugin uses:

https://git.tt-rss.org/fox/tt-rss/commit/6573541873ab6eeb974929668e952266257ba144

I forgot to update tt-rss so the plugin made it crash first. After that, it works great for the first feed I listed (Le Monde.fr - Actualités et Infos en France et dans le monde) but not with the second (Flux RSS : toute l'info sportive en continu - RMC Sport).
As I said yesterday, in the last one, the type is defined in <enclosure> but not in <media:content>.

Thank you very much for your help. I looked in php of the plugin, hoping to find some strings that I could replace to make it work for the second feed but your work is way beyond what I’m capable to understand.

your second feed has small thumbnails in article content which take precedence over automatic attachment display (android client doesn’t display small images because high dpi screens, low dpi images = ugly)

this feed should work fine with the plugin if you enable “always display image attachments” - not on android though i’m afraid. you’ll see both images in article content but not on headlines list.

detecting image sizes to skip small ones is not done because it could be really slow (the only way to do that means downloading the image, at least partially).

plugin works on a list of all attachments tt-rss parser detected for the article, so it doesn’t really matter.

Thanks again for your help and contribution.

I will ask naively one last question : is it possible to “remove” the mention of the small thumbnail inside the article ? That would only leave the attachement in good quality to be displayed in the android client.

I could make another simple plugin that removes all embedded images in article content, this can be useful sometimes

maybe also make it work as a filter target

e: there’s also af_feedmod

Regarding af_feedmod, I was thinking about it a few days ago to solve my problems but I don’t know how it works. I could look into it.
This plugin isn’t maintained anymore and af_feediron looks like it a lot and seems to be more future proof. Do you recommanded one over another ?

I won’t say no if you make another plugin but I’ll let you choose if you think it could be useful to other people… You did more than enough for me today :+1:

obviously use the one that is developed, i don’t use either so i keep mixing them up.

I installed af_feediron and got it working. I now have picture on article list and full article :+1:
Thanks again for everything.