Next.js Discord

Discord Forum

Can I generate the Next / Image images on build?

Unanswered
Devon Rex posted this in #help-forum
Open in Discord
Devon RexOP
Hi,

For SEO purposes I want to generate all product images in advance.
I am using ISR, after build I am calling revalidate on all routes, the problem is that on first load it will generate the image, which may take time and slow down the load, and if lazy will result in higher LCP.

Is there a way to generate the Next / Image images in advance on revalidate of the pages?
Or in cases like that it's better to just use <img> tag? since it's about 200k pages with average of 7 images per page.

0 Replies