nuxt / nuxt/image

ipxStatic doesn't work if image url has Query params

Open
#2,039 1 comment 0 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

This doesn't work when I generate my static site:
<NuxtImg src="https://ui-avatars.com/api/?background=random" />

Repro:
https://stackblitz.com/~/github.com/mrleblanc101/github-6ekmw9q3?file=.output/public/_ipx/q_70/https%3A/ui-avatars.com/api/%253Fbackground%3Drandom

Runnpm run generate && npm run preview
Image isn't showm

Run npm run dev
No problem

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 the linked StackBlitz reproduction and compare npm run generate && npm run preview with npm run dev. Trace how the query string is encoded in .output/public/_ipx/q_70/https%3A/ui-avatars.com/api/%253Fbackground%3Drandom. Done means the image renders after static generation and preview while development behavior remains working.

Written by the indexing model from the issue text.

Assessment

Tech stack
nuxt, typescript
Domain
performance, web-dev
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 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.