Closed shumiyao closed 1 year ago
I'm having the same or similar issue with cdn.swell.store
trying to load images in development.
Unhandled Runtime Error
Error: Invalid src prop [(https://cdn.swell.store/cirqus-marketplace/6475b1306fa54e0012f89985/bcf5c880882c4c48afd72464be461927/5fa3dd1b51410ef7bfff33ac_WinterMurder-p-800.png)](http://localhost:3000/(https://cdn.swell.store/cirqus-marketplace/6475b1306fa54e0012f89985/bcf5c880882c4c48afd72464be461927/5fa3dd1b51410ef7bfff33ac_WinterMurder-p-800.png)) on `next/image`, hostname "cdn.swell.store" is not configured under images in your `next.config.js`
See more info: https://nextjs.org/docs/messages/next-image-unconfigured-host
Unless I left something undefined somewhere?
that is easy to fix.
you have to edit horizon/next.config.js
domains: [ 'cdn.swell.store' , 'cdn.schema.io', ...(isDev ? ['cdn.swell.test'] : [])],
you only need to add 'cdn.swell.store'
to the array in the settings for images.domains
thanks for the fix @shumiyao 🙏🏾
It is fixed in the latest horizon release v0.5.0
Don't we need 'cdn.swell.store' in the next.config.js so that the images from the domain are allowed to be accessed?
https://github.com/swellstores/horizon/blob/39df509bccbf74774ed32d18cc84a395385facb3/next.config.js#L9
Thank you for your attention in advance/