Home >Web Front-end >JS Tutorial >How to fix Nextjs image not loading on production

How to fix Nextjs image not loading on production

Mary-Kate Olsen
Mary-Kate OlsenOriginal
2024-09-25 18:21:42953browse

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

or

yarn add sharp

The above is the detailed content of How to fix Nextjs image not loading on production. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn