Join us live Sept. 27 – How Sanity and Vercel powered Morning Brew's transformation –>

Error after adding the hostname in next.config.js file

6 replies
Last updated: Feb 9, 2021

so I am getting this error but I have added the hostname in next.config.js file as well... any insights?

Feb 9, 2021, 4:12 PM

You need to the put the domain only.

Feb 9, 2021, 4:13 PM

module.exports = {
  
images: {
    
domains: ['<http://sanity.io|sanity.io>'],
  
},

}

Feb 9, 2021, 4:14 PM

this is not working either..

Feb 9, 2021, 4:14 PM

ah I am dumb.

Feb 9, 2021, 4:15 PM

module.exports = {
  
images: {
    
domains: ['<http://cd.sanity.io|cd.sanity.io>'],
  
},

}

Feb 9, 2021, 4:15 PM

this works

Feb 9, 2021, 4:15 PM

Sanity.io: Get the most out of your content

Sanity.io is a platform to build websites and applications. It comes with great APIs that let you treat content like data. Give your team exactly what they need to edit and publish their content with the customizable Sanity Studio. Get real-time collaboration out of the box. Sanity.io comes with a hosted datastore for JSON documents, query languages like GROQ and GraphQL, CDNs, on-demand asset transformations, presentation agnostic rich text, plugins, and much more.

Don't compromise on developer experience. Join thousands of developers and trusted companies and power your content with Sanity.io. Free to get started, pay-as-you-go on all plans.