vue.jsnuxt.jsvuejs3nuxt3.jsstatic-site-generation

How to get Nuxt-img to work on nuxt3 generate?


i am trying to use nuxt-image on NUXT3, but it seems it doesn't work with the generate command. Images work during dev, but get a 404 when using nuxt generate.

in my nuxt config i have

modules: ["@nuxt/image-edge"],  
image: {
    dir: "assets/images",
  },

then in my files i have

<NuxtImg
      format="webp"
      class="mobile"
      src="/website/home/above-fold-illustration-mobile.png"
      alt="illustration"
      aria-hidden="true"
    />

So i am wondering if anyone else had a problem or if this is just a compatibility issue with nuxt-image and nuxt3 generate


Solution

  • this is not yet supported, waiting on https://github.com/nuxt/image/pull/614