Using next/image component for images hosted on Digital Ocean Spaces for Next app hosted on Netlify

I’m having issues loading images with Next.js using the next/image component for a NextJS app hosted on Netlify where the image source is on Digital Ocean Spaces.

I get a 502 error and my client app says “Source is not an image”. I looked at the _ipx function logs and didn’t find anything helpful. I’m stuck and am not sure what to do.

I know that Digital Ocean Spaces has some CORS settings and I’m wondering if I need to configure those? But I’m not exactly sure what those settings would be. The traffic would be coming from the _ipx function. I tried adding

Any help would be greatly appreciated.


Hey @gvanderlugt,

Could you let us know the site URL and where exactly to look for those images (home page, or some other page for example)?

Looks like you’ve written in the helpdesk too.