Grill: full-resolution image/GIF preference rules #33
Labels
No labels
needs-info
needs-triage
ready-for-agent
ready-for-human
wayfinder:grilling
wayfinder:map
wayfinder:prototype
wayfinder:research
wayfinder:task
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
TheAnachronism/tt-rss-viewer#33
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Part of #30
Question
Without site scrapers, what generic rules should the Reader use to prefer a full-resolution image/GIF when multiple candidates already exist in the article HTML, links, and/or enclosures?
Probe with the Reddit example (
.scratch/rss-examples/reddit-example.xml): preview.redd.it<img>+ i.redd.it[link]+ preview enclosure. Also invent non-Reddit cases (srcset, linked originals, thumbnail+full pairs) so the rule stays feed-agnostic.Decide: candidate gathering, ranking/preference, when not to replace the visible
<img>, and how this interacts with enclosure promotion.Resolution
Generic full-resolution image/GIF preference (no site scrapers):
<img>: wrapping<a href>; other same-article<a href>image URLs that share basename with the visiblesrc; same-article image enclosures; andsrcset/data-full-url-style attributes on the img.srcsetcandidate); else prefer a URL that drops resize/thumb query params or path markers (width=,crop=,/thumb(nail)/, etc.); else keep the visiblesrc.image/*enclosure) and shares basename / a clear size-upgrade relationship with the visiblesrc. Never swap in an HTML permalink or unrelated page URL.<img>s first (enclosures may supply the upgrade). Enclosures already used as an upgrade are consumed; leftovers are for Grill: enclosure promotion and dedupe rules, which must not inject a second copy.Reddit fixture:
preview.redd.itpreview<img>upgrades via siblingi.redd.it[link](same basename); the preview enclosure is not a better URL than the visiblesrc.