Alias not working with IPX
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 1.5k
- Forks
- 331
- Avg merge
- 19h 52m
- Merged PRs (30d)
- 9
Description
Alias is not working with default provider IPX
Reproduction:
https://stackblitz.com/edit/github-kmj5sa?file=nuxt.config.ts
I did a npm run generate i.e. nuxi generate.
The image generated still contains the domain.
Below is the settings:
image: {
domains: ['images.pexels.com'],
alias: {
backend: 'https://images.pexels.com',
},
},
and image generated
I thought maybe alias just doesn't work with IPX but in the IPX provider code I see
https://github.com/nuxt/image/blob/58c5139106ed1552a98d318b5ca281e298c36180/src/runtime/providers/ipx.ts#L38
which makes me think IPX does support alias.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the StackBlitz reproduction and nuxt.config.ts, run npm run generate (nuxi generate), then inspect src/runtime/providers/ipx.ts at the linked provider logic. Confirm how the alias setting is handled for IPX and ensure the generated image URL uses the configured alias rather than the original domain.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- nuxt, typescript
- Domain
- web-dev
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100