question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Nuxt Image + Prismic Usage

See original GitHub issue

Hello 👋,

I tried to set up prismic "@nuxtjs/prismic": "^3.0.0-rc.0" with "@nuxt/image-edge": "^1.0.0-27657146.da85542" but it doesn’t seems to work at all. My nuxt.config.ts file :

import { defineNuxtConfig } from 'nuxt'
export default defineNuxtConfig({
  modules: [
    '@nuxt/image-edge',
    '@nuxtjs/prismic'
  ],
  prismic: {
    endpoint: 'my-repo-Id,
    preview: false,
    toolbar: true
  },
  image: {
    provider: 'prismic',
    domains: ['prismic.io']
  }
})

and in the my .vue files :

<template>
          <nuxt-picture
            src="/c-1-910w.webp"
            width="910"
            height="1365"
            sizes="sm:518px, 2xl:910px"
            :img-attrs="{
              class: 'img-unit',
              alt: `Alternative text`
            }"
          />
</template>

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:15

github_iconTop GitHub Comments

1reaction
lihbrcommented, Aug 19, 2022

Hey there,

Looks like you’re trying to use a local image with Nuxt Image Prismic provider set as the default provider.

In such case I think you need to specify an explicit provider:

<nuxt-picture
	provider="ipx"
	src="/c-1-910w.webp"
	width="910"
	height="1365"
	sizes="sm:518px, 2xl:910px"
	:img-attrs="{
		class: 'img-unit',
		alt: `Alternative text`
	}"
/>

Let me know 😃

0reactions
lihbrcommented, Oct 5, 2022

Closing as stale, feel free to reopen if you’d like to continue the troubleshooting process.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Nuxt Image Is Out, and So Is Its Prismic Integration!
The Nuxt team built Nuxt Image to optimize images on Nuxt websites. It handles the hard parts of transforming and optimizing assets through...
Read more >
Prismic - Nuxt Image
Prismic allows content writer to manipulate images through its UI (cropping, rezising, etc.). To preserve that behavior this provider does not strip query ......
Read more >
Manage static content with Prismic.io and Nuxt.js - Bitbull
Prismic it's quite light and fast to configure and, in our specific case, we're going to use it to replace the Magent CMS...
Read more >
Prismic to Nuxt.js Headless Tutorial - YouTube
Welcome to a tutorial using Prismic as a headless CMS with Nuxt.js as a front-end framework. I will take you through to steps...
Read more >
add prismic provider (#269) · nuxt/image@306064b - GitHub
Plug-and-play image optimization for Nuxt applications. - feat: add prismic provider (#269) · nuxt/image@306064b.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found