Skip to content

Prismic provider doesn't work when selecting a placeholder image from Unsplash #1600

@mrleblanc101

Description

@mrleblanc101

In Prismic, when selection on image, you have two choices.

  1. Upload your own image
  2. Select an image from Unsplash

The provider work properly when you upload yout own image:
Image

But it doesn't work properly when you select an unsplash image in the interface:
Image

The image on the top comes from <NuxtImg provider="prismic" :src="slice.primary.image.url" />, the image on the bottom comes from <PrismicImage :field="slice.primary.image">.

@nuxt/image seems to replace the images.unsplash.io from images.prismic.io regardless:

<!-- NuxtImg -->
<img
  onerror="this.setAttribute('data-error', 1)"
  data-nuxt-img=""
  srcset="
    https://images.prismic.io/photo-1597714026720-8f74c62310ba?crop=entropy&amp;cs=srgb&amp;fm=jpg&amp;ixid=M3wzMzc0NjN8MHwxfHNlYXJjaHwxfHxjaXRydXMlMjBmcnVpdHxlbnwwfHx8fDE3MzE3NDQ4NzZ8MA&amp;ixlib=rb-4.0.3&amp;q=70 1x,
    https://images.prismic.io/photo-1597714026720-8f74c62310ba?crop=entropy&amp;cs=srgb&amp;fm=jpg&amp;ixid=M3wzMzc0NjN8MHwxfHNlYXJjaHwxfHxjaXRydXMlMjBmcnVpdHxlbnwwfHx8fDE3MzE3NDQ4NzZ8MA&amp;ixlib=rb-4.0.3&amp;q=70 2x
  "
  src="https://images.prismic.io/photo-1597714026720-8f74c62310ba?crop=entropy&amp;cs=srgb&amp;fm=jpg&amp;ixid=M3wzMzc0NjN8MHwxfHNlYXJjaHwxfHxjaXRydXMlMjBmcnVpdHxlbnwwfHx8fDE3MzE3NDQ4NzZ8MA&amp;ixlib=rb-4.0.3&amp;q=70"
  data-v-inspector="node_modules/.pnpm/@[email protected][email protected][email protected][email protected]/node_modules/@nuxt/image/dist/runtime/components/NuxtImg.vue:2:3"
  data-error="1"
/>
<!-- PrismicImage -->
<img
  src="https://images.unsplash.com/photo-1597714026720-8f74c62310ba?crop=entropy&amp;cs=srgb&amp;fm=jpg&amp;ixid=M3wzMzc0NjN8MHwxfHNlYXJjaHwxfHxjaXRydXMlMjBmcnVpdHxlbnwwfHx8fDE3MzE3NDQ4NzZ8MA&amp;ixlib=rb-4.0.3&amp;q=85"
  alt="orange fruits under blue sky during daytime"
  class="es-alternate-grid__image es-alternate-grid__image--left"
/>

Data:

{
  "dimensions": {
    "width": 5688,
    "height": 3792
  },
  "alt": "orange fruits under blue sky during daytime",
  "copyright": null,
  "url": "https: //images.unsplash.com/photo-1597714026720-8f74c62310ba?crop=entropy&cs=srgb&fm=jpg&ixid=M3wzMzc0NjN8MHwxfHNlYXJjaHwxfHxjaXRydXMlMjBmcnVpdHxlbnwwfHx8fDE3MzE3NDQ4NzZ8MA&ixlib=rb-4.0.3&q=85",
  "id": "eaOjEz8746k",
  "edit": {
    "x": 0,
    "y": 0,
    "zoom": 1,
    "background": "transparent"
  }
}

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions