"If a worker wants to do his job well, he must first sharpen his tools." - Confucius, "The Analects of Confucius. Lu Linggong"
Front page > Programming > How to fix Nextjs image not loading on production

How to fix Nextjs image not loading on production

Published on 2024-11-09
Browse:311

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
Release Statement This article is reproduced at: https://dev.to/abayomijohn273/how-to-fix-nextjs-image-not-loading-on-production-10k2?1 If there is any infringement, please contact [email protected] to delete it
Latest tutorial More>

Disclaimer: All resources provided are partly from the Internet. If there is any infringement of your copyright or other rights and interests, please explain the detailed reasons and provide proof of copyright or rights and interests and then send it to the email: [email protected] We will handle it for you as soon as possible.

Copyright© 2022 湘ICP备2022001581号-3