Next.js Discord

Discord Forum

remote images cache warmup strategy? next/image

Unanswered
Polish posted this in #help-forum
Open in Discord
Avatar
PolishOP
Hey, we have a very large set of images being served from a few 3rd party websites in our next app.

Im using next/image to include them on the page. Usually a page has about 20 remote images included in the body, but they’re dynamic and come from a pool of 500k unique images.

With next they seem to be loading extremely slow the first time, and I imagine it’s probably related to the image compression and caching its trying to do in real time for initial requests.

I think the performance will get better over time as it starts to warm up the cache, but what’s the strategy for pre-warming the cache —so that first time users pages don’t take forever to load? That, and every time there’s a redeploy the cache will flush, so it seems pretty critical to figure this out

Or maybe I’m doing something wrong?

0 Replies