summaryrefslogtreecommitdiff
path: root/BACKLOG.md
diff options
context:
space:
mode:
authorPeter Stone <thepeterstone@gmail.com>2026-07-22 20:46:48 +0000
committerPeter Stone <thepeterstone@gmail.com>2026-07-22 20:46:48 +0000
commit8e06fc84c0b540f8ba87afa19d4c08eab7af80d9 (patch)
tree46a76a625c4265b14514dfc9d3575e8c5546f1fd /BACKLOG.md
parent34b663c6e75a2c360de154418dafb8f616b546a1 (diff)
Resolve lazy-loaded images/media before running Readability
Many sites lazy-load media via JS: the real URL sits in a data-src/ data-srcset attribute and only gets copied into src/srcset once the site's own script runs -- which never happens in the reader WebView (JS is off by design, so articles can't run arbitrary third-party scripts). Left alone this showed either a placeholder/category icon stretched to fill the article width (reported live with a screenshot: a giant flask icon in place of the real photo on an Ars Technica article), or nothing but alt text (reported for NYT articles' images and videos). Before either Readability pass, walk <img>/<source> elements and copy common lazy-load attributes (data-src, data-original, data-lazy-src, data-srcset) into src/srcset, falling back to the first srcset candidate if src is still empty. Also strip width/height attributes on images -- they're sized for the site's real photo, not whatever was in the unresolved src, so our own max-width:100%/height:auto sizing now takes over based on the (correctly resolved) image's actual dimensions. Verified live: the Ars Technica article that previously showed the stretched flask icon now renders clean, with no image where the broken one used to appear and the full real article text intact.
Diffstat (limited to 'BACKLOG.md')
0 files changed, 0 insertions, 0 deletions