You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We were running into some issues where we implemented this module and suddenly our build does break and the images cannot be displayed. The browser gets a 404 when requesting the images. In production we are running nuxt inside a docker containter.
While trying to reproduce this issue with a clean repo i discovered that the image.dir option (docs) is resulting in this behavior.
Hey all!
We were running into some issues where we implemented this module and suddenly our build does break and the images cannot be displayed. The browser gets a
404
when requesting the images. In production we are running nuxt inside a docker containter.While trying to reproduce this issue with a clean repo i discovered that the
image.dir
option (docs) is resulting in this behavior.Versions:
I also tried your playground, same problem. See the playground fork here: https://stackblitz.com/edit/github-fxrrqo-tfd5wv
So clean repo with:
npx nuxi@latest init nuxt-image-test
npm install @nuxt/image
@nuxt/image
to modules in nuxt.config.tsTestPhoto.webp
) withNuxtImg
-Tag toapp.vue
src="/TestPhoto.webp"
npm run dev
and see working sitenpm run build
andnpm run preview
to see correct siteSo add
image.dir
as module options:dir: "public/img"
public/img
NuxtImg
-Tag tosrc="TestPhoto.webp"
npm run dev
and see working sitenpm run build
andnpm run preview
to see broken siteWhile discovering this, I removed the
image.dir
option in our project and the production build does not fail anymore.The text was updated successfully, but these errors were encountered: