4 ms·
I was playing with progressive PNGs, and with an "intelligent" web server, it's possible to halt image transmission (either temporarily or permanently) at a ser
by Retr0id 5y ago
I was playing with progressive PNGs, and with an "intelligent" web server, it's possible to halt image transmission (either temporarily or permanently) at a server-decided quality level.
Here is a demo, which uses the different resolutions to create a pseudo-animation:
https://www.da.vidbuchanan.co.uk/adamation/image.png https://www.da.vidbuchanan.co.uk/adamation/image.png
It would be theoretically possible to write a server with a "give me the next quality level now" API endpoint, to enable the client to signal that it's ready for the next resolution.
This is far too janky to be used in production, but at least its fun.
- rdsubhas 5y agoInteresting, but doing it server side can screw up CDNs (which are quite important for images). It's better if the client takes care of that, so CDNs can cache the full image.
- ec109685 5y agoThere has to be some incoming header / query param to indicate the resolution the browser is asking for in order know when to stop delivering bytes, so that can be used to vary the CDNs cache key.