nuxt / nuxt/image

404 for images on vercel using a server build

Open
#327 13 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
1.5k
Forks
331
Avg merge
19h 52m
Merged PRs (30d)
9

Description

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.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the SSR Nuxt deployment on Vercel and inspect the generated nuxt-img URL under _vercel/image. Compare that URL with the working plain img path and the images shown in Vercel's output section. Done means optimized image URLs resolve successfully in the deployed application.

Written by the indexing model from the issue text.

Assessment

Tech stack
nuxtjs, typescript
Domain
frontend, performance
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.