DEV Community

Abayomi Olatunji
Abayomi Olatunji

Posted on

How to fix Nextjs image not loading on production

Hello devs,
I recently faced an issue around images not loading on production but working perfectly well on locals.

Accessing the image on production gives this error message

"url" parameter is valid but upstream response is invalid

For the above error, irrespective of the version you are running on, kindly install sharp and that is all!

npm i sharp
Enter fullscreen mode Exit fullscreen mode

or

yarn add sharp
Enter fullscreen mode Exit fullscreen mode

Top comments (0)