Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Nextjs Image Component 502 Error in Server

next/image cause the server down of error 502 gateway error.

I check from the devtool network, it go fetch the third party (themoviedb) api. Those images cannot be load correctly but it work fine in my local machine in nextJs build in image component.

I tried to use pure html tag to load those image, this 502 gateway error is solved.

Is any clue that why next/image are causing my DO server 502 gateway error?

like image 960
Wilker Avatar asked Feb 23 '26 15:02

Wilker


1 Answers

I had this same problem, and it was resolved when I reduced the image sizes down to 2000px x 2000px (or below). I also reduced the resolution to 90 at the same time, but I suspect the overall size was the issue. My files were PNGs, in case that's helpful.

like image 64
emersonthis Avatar answered Feb 27 '26 01:02

emersonthis