1

I am working on the latest nextJS version. I am trying to load images from a Magento CMS. They work fine in local, but on deployment to Vercel, I get not found error

GET https://consumer-omega.vercel.app/a/b/absinthe20teichnnd_vhi6ffkxpdwl9ism.jpg 404

I have already added the domain name of CMS to the domains setting in images under next.config.js.

images: {
    domains: ["devconsole.appname.com", "appname-omega.vercel.app"],
  }

For reference for debugging, this is the URL that gets requested for in local

http://localhost:3000/_next/image?url=https%3A%2F%2Fdevconsole.appname.com%2Fmedia%2Fcatalog%2Fproduct%2F8%2F2%2F820pm20whisky_c0ihwxvhlkqdbupv.jpg&w=256&q=75

Where as in the deployed environment for, the requested URLs are something like this

https://appname-omega.vercel.app/_next/image?url=%2F8%2F2%2F820pm20whisky_c0ihwxvhlkqdbupv.jpg&w=256&q=75
Sahil Sharma
  • 1,493
  • 2
  • 10
  • 22

0 Answers0