Next.js Discord

Discord Forum

Can I set custom timeout for a single `<Image />`? (next/image)

Unanswered
Dreamgineer posted this in #help-forum
Open in Discord
I am using an external API that takes a long time on first load & returns a huge image which I want next/image to optimize. But most of the times it times out before the API returned the image.
Currently, I have experimental.imgOptTimeoutInSeconds set, but I want other Images to still have normal timeout.

1 Reply

European Golden-Plover
Maybe, you can control that with javascript code.