Settings

Theme

Ask HN: Retrieving multiple images with a single request?

1 points by shanebellone · 6 comments · 1 min read


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.

4 threads
timoteostewart

I 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.

agnokapathetic

CSS Image Sprites https://www.w3schools.com/Css/css_image_sprites.asp

  • shanebelloneOP

    I'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

You 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

  • shanebelloneOP

    I 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

Could you transmit multiple images in a zip file?

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection