Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prismic provider with netlify #1348

Closed
JosBouma opened this issue May 2, 2024 · 5 comments
Closed

Prismic provider with netlify #1348

JosBouma opened this issue May 2, 2024 · 5 comments
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@JosBouma
Copy link

JosBouma commented May 2, 2024

I'm deploying a site to Netlify using Nuxt Image with Prismic as the provider.
In my nuxt config i got:

  image: {
    prismic: {}
  },

Locally everything (run dev/generate) works as intended and src looks like this:

https://images.prismic.io/[reponame]/ZjD8LEMTzAJOCcrE_pdf-remotetechteam.png?auto=format,compress

When i deploy to Netlify the images don't display. On Netlify the src has a relative URL like so:

/.netlify/images?w=947&h=795&url=https:%2F%2Fimages.prismic.io%2F[reponame]%2FZjD8LEMTzAJOCcrE_pdf-remotetechteam.png?auto=format,compress

Am I doing something wrong or is this a bug?

Copy link
Member

danielroe commented May 2, 2024

For now, would you set provider: 'prismic' explicitly? It looks like the Netlify environment is leading Nuxt Image to override your custom provider, which is a bug.

@JosBouma
Copy link
Author

JosBouma commented May 2, 2024

Setting it explicitly like you said fixed the issue, thanks!

  image: {
    // prismic: {}
    provider: 'prismic'
  },

@danielroe danielroe added the bug Something isn't working label May 3, 2024 — with Volta.net
@Baroshem
Copy link
Collaborator

Baroshem commented Dec 9, 2024

@lihbr would you be able to take a look at it? :)

@Baroshem Baroshem added the help wanted Extra attention is needed label Dec 9, 2024
@lihbr
Copy link
Member

lihbr commented Dec 9, 2024

As Daniel said, I believe Netlify has the default provider defaulting to ipx, so setting it to prismic instead will change it.

I'm confused if this is a bug or the intended behavior? (not sure given the description here)

This is the setup I would expect:

image: {
	prismic: {}
	provider: 'prismic'
},

@Baroshem
Copy link
Collaborator

Thanks for the comment @lihbr

I will close this issue then. If the problem still occurs, feel free to reopen it :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

4 participants