"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."
Solution:
I managed to solve the problem, I changed it to a native HTML class
Jump to solution
17 Replies
Matheus N
Matheus N13mo ago
d5f8edf5-2e3b-48d9-b339-e7356cf40f25
Brody
Brody13mo ago
what errors do you see in the logs?
Matheus N
Matheus N13mo ago
The images do not appear in the browser, but the build process is happening normally; I am using Next.js
Brody
Brody13mo ago
do you see any errors in the deployment logs?
Matheus N
Matheus N13mo ago
There are no errors in the deployment logs, just a dependency warning
No description
Brody
Brody13mo ago
if you are experiencing errors it would be a good idea to log them, very hard to debug issues like this without error logs
Matheus N
Matheus N13mo ago
Error in browser
No description
Brody
Brody13mo ago
unfortunately just a 500 code is not very helpfull, you will want to log the actual reason for the error in next
Matheus N
Matheus N13mo ago
Errors in deploy
No description
Brody
Brody13mo ago
where are the images stored?
Matheus N
Matheus N13mo ago
In the public folder of my in next project, there are static images
Brody
Brody13mo ago
then im not quite sure why next is doing a fetch or what ssl has to do with serving files from disk?
Solution
Matheus N
Matheus N13mo ago
I managed to solve the problem, I changed it to a native HTML class
Brody
Brody13mo ago
awsome!
Matheus N
Matheus N13mo ago
Not the Image class of next
Brody
Brody13mo ago
gotcha
Medim
Medim13mo ago
Make sure u have "sharp" in ur package.json dependecies (not devDependencies) Deploying on Vercel auto-includes sharp for you, not on Railway tho
Want results from more Discord servers?
Add your server