#Image caching in calculateMetadata()

7 messages · Page 1 of 1 (latest)

mental harness
#

Salut remotion team
I'm curious if there is a somewhat good way to fetch images once and store them in a buffer / blob something.

I'm fetching brand logos from https://brandfetch.com/ and they seem to be running a vercel server which doesn't play nice with remotion rendering.
Works fine in studio tough.

Any ideas how to structure this properly ?

mental harness
obsidian gorge
#

inbetween running calculatemetadata and rendering, the browser page gets completely wiped, so there is no chance to cache

in that case you need to run your own preprocessing, like for example downloading it and switching to loading from local storage

that is all not possible on lambda which anyway starts each function fresh

#

the guidelines of third party providers should of course also be respected

mental harness
#

🙂

#

yeah - I'll probably have to find something else that works

#

Just out of curiousity for public url images. In lambda let's say I have a 100Frames video. and I have 20Frames per lambda
would the image be downloaded 5 times for each lambda that's spinning up.?