Configuring Nuxt Image for Dynamic Paths in Custom Module
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 1.5k
- Forks
- 331
- Avg merge
- 19h 52m
- Merged PRs (30d)
- 9
Description
Discussed in https://github.com/nuxt/image/discussions/1244
Originally posted by sync42johnny February 9, 2024
I'm developing a custom Nuxt module that uses @nuxt/image for image optimization. My aim is to serve images from a directory relative to the module's runtime directory. Here's my current setup:
installModule('@nuxt/image', {
providers: {
customIPX: {
}
},
image: {
}
});
I'm looking for advice on: configuring my module to use @nuxt/image for runtime-relative image paths, because now nuxt image grabs images from project where i use my custom nuxt module(
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 linked Nuxt Image Discussion #1244 and the installModule('@nuxt/image', ...) configuration shown in the issue. Trace how the custom module's runtime-relative image directory is resolved versus the consuming project. Done should be a confirmed configuration path or a clearly documented limitation and next step.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- nuxt, typescript
- Domain
- performance, tooling, web-dev
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100