Elektrine lite

← Feed

@normplum@fosstodon.org

Post #2898678

2026-04-13 10:31 UTC

@mateus@tech.lgbt Would client-side JS allow for that though? I'd have thought if the hundreds of images are all in the HTML, they'll get loaded regardless of whether they're shown or hidden by JS...

Replies (1)

  • @mateus@tech.lgbt 2026-04-13 11:06

    @normplum@fosstodon.org I don't know the specifics off the top of my head, but most modern browsers will delay loading images until they're shown, so if you just keep them in a 'display: none' container, you should see that they don't actually get loaded until you page to them. If that doesn't work, you can just store the image URLs in a JavaScript array or some other tag, and then render them as actual image tags only when the user is on that page

    Open ##2898679