nuxt / image

Plug-and-play image optimization for Nuxt applications.
https://image.nuxt.com
MIT License
1.35k stars 270 forks source link

using generate on nuxt3 doesnt work #636

Open jpengelbrecht opened 2 years ago

jpengelbrecht commented 2 years ago

I am trying to use this component on nuxtRC 11. the component works great in the dev server, however all images are broken on the generate command.

modules: ["@nuxt/image-edge"],  
image: {
    dir: "assets/images",
  },
<NuxtImg
      format="webp"
      class="mobile"
      src="/website/home/above-fold-illustration-mobile.png"
      alt="illustration"
      aria-hidden="true"
    />

i tried moving all my images to public and dropping the dir command and it still breaks. +

Triloworld commented 2 years ago

Static deployment is in work. You can check my solution in meantime: https://github.com/nuxt/image/discussions/548#discussioncomment-3734270

Triloworld commented 2 years ago

Using format="webp" can have some issues - check before post :) (source: https://github.com/nuxt/image/issues/626) I don't get generated webp format images

jimhlad commented 2 years ago

Tagging #614 just to help keep things organized