I want to build a web application with Node.js that allows browsing the server’s file system and viewing media files without cache.
Can i somehow stream the resulting data and maybe even display parts of the progressive loading even before the image processing is completed?
I’m looking for the lowest delay between request and first visible pixels (even if very low quality or blurry like with AVIF progressive loading) in the Browser on low-bandwidth connections like 3G mobile and with potentially very large images on the server (e.g. ~10MB PNG files) without caching. (I will add caching but that’s not part of my question)
Right now i’m using an endpoint that uses Sharp to convert the requested image to WebP and stream the response.
However, WebP doesn’t support progressive display. AVIF does, but might require more time on average to generate. Is that worth it?
Daniel First is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
1