Home > Web Front-end > JS Tutorial > body text

How to fix Nextjs image not loading on production

Mary-Kate Olsen
Release: 2024-09-25 18:21:42
Original
933 people have browsed it

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
Copy after login

or

yarn add sharp
Copy after login

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!

source:dev.to
Statement of this Website
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
Latest Articles by Author
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template