3 ms·
Ask HN: Retrieving multiple images with a single request?
Is there an existing solution that retrieves n-images with a single request? Rather than an individual request for each image?
Note: I am familiar with HTTP2 multiplexing.
- agnokapathetic 3y agoCSS Image Sprites https://www.w3schools.com/Css/css_image_sprites.asp https://www.w3schools.com/Css/css_image_sprites.asp
- shanebellone 3y agoI'm familiar with css sprites too. That's still just 1 image per request though. Say you wanted to populate a social media feed... you'd need to dynamically call media. That produces a huge amount of requests. What if you want to batch 10 images per request? Does anyone currently do that?
- pestatije 3y agoYou could do that with blobs and client code...or use mjpeg movies...im not aware of multiple images as such though...itd be worth researching multipart mime types i think
- shanebellone 3y agoI already have a working prototype that batches media requests. In my example case, I'm sending 1 request and receiving 6 images in return.
- timoteostewart 3y agoCould you transmit multiple images in a zip file?
- timoteostewart 3y agoI think JS libraries such as gif.js and gifplayer.js can display specific frames of a gif. So possibly you could create an animated gif whose frames are your portfolio of images, and so you could retrieve n images using your lone n-frame gif image.