Settings

Theme

Ask HN: Retrieving multiple images with a single request?

1 points by shanebellone 2 years ago · 6 comments · 1 min read

Reader

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.

timoteostewart 2 years ago

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 2 years ago

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

  • shanebelloneOP 2 years ago

    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 2 years ago

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 2 years ago

    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 2 years ago

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