nuxt / nuxt/image

No generated images with SSR build and Vercel

Open
#440 1 comment 6 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

The module works locally perfect:

  • Page transitions working fine
  • Images are generated with the path:
    http://localhost:8000/_ipx/w_1920,q_90/images/slider/test.jpg for example.

But on Vercel SSR won't generate the correct size images.

<source type="image/webp" srcset="https://server.loremipsum.nl/sites/default/files/styles/overview/public/blog/2021-08/header%20ss.png?itok=_mioy-y1 640w, https://server.loremipsum.nl/sites/default/files/styles/blog_overview/public/blog/2021-08/header%20ss.png?itok=_mioy-y1 384w, https://server.loremipsum.nl/sites/default/files/styles/overview/public/blog/2021-08/header%20ss.png?itok=_mioy-y1 512w" sizes="(max-width: 640px) 100vw, (max-width: 768px) 50vw, 50vw">

The page transitions also don't work.

Build commando: npm run build

Local settings:

nuxt.config.js
export default { ssr: true, modules: [ '@nuxt/image', ], image: { domains: ['server.loremipsum.nl'], } }

package.json
"@nuxt/image": "0.4.1"

vercel.json
{ "builds": [ { "src": "nuxt.config.js", "use": "@nuxtjs/vercel-builder", "config": {} } ] }

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 with nuxt.config.js, package.json, and vercel.json, then run npm run build and compare the generated image URLs and page-transition behavior locally versus the Vercel SSR deployment. Determine whether the reported srcset and transition failures share a deployment configuration issue; done means correctly sized images and working page transitions on Vercel.

Written by the indexing model from the issue text.

Assessment

Tech stack
nuxtjs, typescript
Domain
cloud, performance
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.