image
image copied to clipboard
404 for images on vercel using a server build
Deploying a ssr nuxt build to vercel the images are all returning 404.
The urls generated at deployment on vercel are
https://my-domain/_vercel/image?url=/logos/netbuoy-logo-solid-white.png&w=768&q=100
Ive deployed several other nuxt apps recently with the same config and had no problems.
The nuxt-img docs say that the vercel provider will be used by default when deploying to vercel.
I can see the images fine vercels 'output' section for the deployment, so the actual files are there it seems to be an issue with the generated paths.
If I drop nuxt-img tags for plain img tags the images work again on the vercel deployment.
Rolling back to 0.4.1 of nuxt-img solved the issue with images not showing. The original issue seems confined to the most up to date version of nuxt image.
I am also encountering this error and have been unable to solve the issue. It appears to be when running the applications in SSR mode and the serverMiddleware is catching the URL and sending a 404 response because /_vercel/image does not exist in the Nuxt Routes.
I just came across this issue too. Rolling back to 0.4.1
has fixed things for me too.
@collinped, have you been able to resolve this issue running SSR mode? I have not been able to do so yet, unfortunately. Rolling back to 0.4.1 did not resolve the 404s on server-side for me. Locally it runs fine, but when deploying to Vercel using vercel/builder, 404s is all I get.
Let me know! :)
Interested as well, _vercel/image doesn't exist in SSR for me
Same here. Getting 404s with vercel builder
Did any one found any solution for this?
same problem here.
This issue seems to be stale but still occurring - I'm wondering if there is a vercel edge network that needs to be included in our packages
Some vercel docs I'm investigating now https://vercel.com/docs/concepts/image-optimization
I think this is a support question for Vercel, as the docs seem to suggest how these URLs are modified is accurate. I'm on a pro plan and should have good limits, but I wonder if my vercel.json is interfering.
Vercel's response
Nuxt Image for Nuxt 3 (image-edge) is currently in an experimental state and according to this Nuxt 3 Support Roadmap in GitHub Discussions , there seems to be some problems with the IPX Provider and the Vercel Integration.
Unfortunately, as this is in an experimental state, we are unable to provide further Assistance here. Instead, you may consider using Nuxt 2 and the corresponding nuxt-image component or reach out to the Nuxt Image Discussions, as there are already some discussions ongoing on this topic.
You'll see an item in there which says the Vercel support is broken.
Specifically: https://github.com/nuxt/image/discussions/548#discussioncomment-3116371
Facing the same exact issue. Though i have two observation
- Any other versions above 0.4.1 gives 404
- Using 0.4.1 does show the images but they are not optimised, ( i have added props to conver all images in .webp extension but they appear with their respective extension)