"I deployed a website using Next.js 13, but the images in the 'public' folder are not showing
"I deployed a website using Next.js 13, but the images in the 'public' folder are not showing; it gives a 500 error."
17 Replies
d5f8edf5-2e3b-48d9-b339-e7356cf40f25
what errors do you see in the logs?
The images do not appear in the browser, but the build process is happening normally; I am using Next.js
do you see any errors in the deployment logs?
There are no errors in the deployment logs, just a dependency warning
if you are experiencing errors it would be a good idea to log them, very hard to debug issues like this without error logs
Error in browser
unfortunately just a 500 code is not very helpfull, you will want to log the actual reason for the error in next
Errors in deploy
where are the images stored?
In the public folder of my in next project, there are static images
then im not quite sure why next is doing a fetch or what ssl has to do with serving files from disk?
Solution
I managed to solve the problem, I changed it to a native HTML class
awsome!
Not the Image class of next
gotcha
Make sure u have "sharp" in ur
package.json
dependecies (not devDependencies)
Deploying on Vercel auto-includes sharp
for you, not on Railway tho