0

When I make a request with Postman, I always recieve an image. With Postman it works perfectly. But when I make a request form app, error 404 is occured in console. It happens only if I use Image tag, from nextjs/image library. When I use common tag img, everything is fine.

location /_next/ {
    alias /home/ubuntu/app/client/_next;
    sendfile on;
    sendfile_max_chunk 1m;
}

location /images/ {
    alias /home/ubuntu/app/server/images/;
    sendfile on;
    sendfile_max_chunk 1m;
}

When client and server are running on localhost everything works. How can i say to NGINX where it must look for images?

Ihor Horb
  • 1
  • 1
  • I've found solution here: https://stackoverflow.com/questions/64972168/how-to-cache-nextjs-10-0-images-using-nginx?rq=1 – Ihor Horb Sep 19 '22 at 11:09

0 Answers0