You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After updating to Next 12.0.2 (from 11.1.2) I can no longer have the imgix loader configured in next.config.js with the path as an empty string.
Error message that I get
Error: Specified images.loader property (imgix) also requires images.path property to be assigned to a URL prefix.
See more info here: https://nextjs.org/docs/api-reference/next/image#loader-configuration
at assignDefaults (/Users/arnarthor/code/website/node_modules/next/server/config.ts:297:13)
at Object.loadConfig [as default] (/Users/arnarthor/code/website/node_modules/next/server/config.ts:603:7)
at async NextServer.loadConfig (/Users/arnarthor/code/website/node_modules/next/server/next.ts:124:18)
at async NextServer.prepare (/Users/arnarthor/code/website/node_modules/next/server/next.ts:96:20)
The reason I need this is because I load my images from Prismic, which uses imgix behind the scenes, so it's the same imgix API, I just don't have direct access to the filenames because they are dynamically loaded from a CMS.
We load our images using their API so an example of our image component is <Image src={prismicData.image.url} alt={prismicData.image.alt} />
This means we can't use a path prefix because it will append the path in front of the prismic response that we get.
Prismic also returns us different URLs based on if it's a PNG or an SVG. Meaning we get SVGs from my-website.cdn.prismic.io while we get PNGs from images.prismic.io but there is no difference in the API response apart from the URL for these types.
Expected Behavior
Allow me to continue using the images: {loader: "imgix", path: ""}
To Reproduce
Create a next.config.js with {images: {loader: "imgix", path: ""}}
The text was updated successfully, but these errors were encountered:
This issue has been automatically locked due to no recent activity. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you.
vercel
locked as resolved and limited conversation to collaborators
Jan 27, 2022
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
What version of Next.js are you using?
12.0.2
What version of Node.js are you using?
16.3.0
What browser are you using?
Safari/Brave
What operating system are you using?
macOS
How are you deploying your application?
Netlify
Describe the Bug
After updating to Next 12.0.2 (from 11.1.2) I can no longer have the imgix loader configured in
next.config.js
with the path as an empty string.Error message that I get
The reason I need this is because I load my images from Prismic, which uses imgix behind the scenes, so it's the same imgix API, I just don't have direct access to the filenames because they are dynamically loaded from a CMS.
We load our images using their API so an example of our image component is
<Image src={prismicData.image.url} alt={prismicData.image.alt} />
This means we can't use a path prefix because it will append the path in front of the prismic response that we get.
Prismic also returns us different URLs based on if it's a PNG or an SVG. Meaning we get SVGs from
my-website.cdn.prismic.io
while we get PNGs fromimages.prismic.io
but there is no difference in the API response apart from the URL for these types.Expected Behavior
Allow me to continue using the
images: {loader: "imgix", path: ""}
To Reproduce
Create a
next.config.js
with{images: {loader: "imgix", path: ""}}
The text was updated successfully, but these errors were encountered: