image: images return 404 when using `nuxt generate` + vercel preset
Using nuxt-img with local images and they dont seem to work when the pages are prerendered. They throw a 404 error.

The images are displayed locally in dev environment.

Reproduction - https://github.com/fayazara/nuxt-image-issue-reproduction
Deployed on Vercel - https://nuxt-image-issue-reproduction.vercel.app/ Deployed on Netlify - https://wondrous-medovik-574c06.netlify.app/
A remote image URL work btw. Happens only with local static images.
Build command was set to yarn generate
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Reactions: 18
- Comments: 15 (2 by maintainers)
I believe I am seeing this issue too. It works fine when I do
npm run devbut once I deploy to produciton, the local images are 404.IPX Error: Error: File not found (/public/images/avatar-placeholder.svg)This is also the case for me when using
<nuxt-img>and local images. It works in dev, but not withbuildorgenerate. Tried on both linux and windows without success.Anybody found a temporary fix to this yet?
how did you fix this TheoParkos ?
same error for me, even after the #614 update