Get a peek at our latest innovations at Sanity Product Day on Dec 8th →

Error: Invalid src prop

2 replies
Last updated: Aug 10, 2021

Error: Invalid src prop (<;q=75&amp;fit=clip&amp;auto=format>) on `next/image`, hostname "<|>" is not configured under images in your [] `next.config.js`
See more info: <>
I am getting this error. I have “ ” in my next.config.js. It works if I use next/image directly in my next project, however it throws this error when I am importing a component that wraps next/image from an external component library. Does anyone have experience with this? I can see that the external library is using the wrong next.config.js but am not sure why. It looks as though it is just using the default next.config.js

Aug 9, 2021, 11:55 PM

I found that I didn’t have my peer dependencies setup correctly so it was using the incorrect next.config.

Aug 10, 2021, 3:54 AM

Good catch, George. Glad you got this working. 👍

Aug 10, 2021, 10:30 PM Get the most out of your content is a platform to build websites and applications. It comes with great APIs that let you treat content like data. Free to get started, and pay-as-you-go on all plans. Find out more.