Elektrine lite

← Feed

@chrysn@chaos.social

Post #890441

2026-03-25 08:35 UTC

With the speed around #JpegXL picking up (now in #Firefox and #Chrome nightlies), I'm wondering what good use of an #HTML srcset would be there. As JXL's progressive compression is good, we don't need different files in the srcset (so there's no need to load the first few KiB again when zooming in), but how can or should the HTML somehow tell the browser that for (say) up to 800px width it can request the Range: bytes=0-12345, and the next usable zoom level of 1600px needs the first 42KiB?

Replies (1)

  • @jimbo2150@mastodon.social 2026-03-25 13:07

    @chrysn While that could be done as a fallback it could present issues if you want to upload a new version of the image with more or fewer sizes. I feel it should happen automatically by the browser (no srcset) or, at the very most srcset="auto" in combination with sizes attribute where the browser uses the information it gets from the image header to determine how much to download.

    Open ##1066633