nuxt / nuxt/image

Configuring Nuxt Image for Dynamic Paths in Custom Module

Open
#1,246 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

question
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

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 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.