Next/image not working in a site with basic authentication on

Hello there,
I’ve been developing a nextjs site and found an issue with images on my landing page. The site has basic authentication on and the image request is failing because of that, it returns a 401 code. If I turn off the authentication the image is loaded perfectly.

This is my project web https://development--splunk-domane.netlify.app.

Hi @mrcportillo,

That is expected behaviour. Workaround will be to load images from a different website that doesn’t have basic auth, or remove the basic auth altogether. You can also try using JWT as it’s cookie-based.