nuxt / nuxt/image

Nuxt 3 @nuxt/image and IPX Issue with Dynamic Pages

Open
#1,773 3 comments 4 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

Hello,

I apologize upfront in case this has been asked before. I wasn’t able to find any related topic.

I have an issue with @nuxt/image and IPX in my Nuxt 3 project.
I have a component named Pitchdeck.vue that uses NuxtImg like this:

< NuxtImg :src="images/pitchdeck/example.webp" alt="Example image" />
(Don't mind the space after <, without it, the line is not shown in the topic)

When I use this component in a static page (pitch.vue), everything works fine.

However, I need to use it in a dynamic page ([...pitch].vue), and that's where the problem arises. The images from Pitchdeck.vue are not included in the build when using yarn generate. As a result, they do not appear in the .output/public/_ipx folder.

It seems to be related to the dynamic pages and NuxtImg/IPX image generation.

Has anyone encountered this issue and found a solution?

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 Pitchdeck.vue and compare its behavior when rendered from pitch.vue versus [...pitch].vue. Run yarn generate and inspect .output/public/_ipx to reproduce the missing images. Done means images referenced by the dynamic page are included and render correctly in the generated output.

Written by the indexing model from the issue text.

Assessment

Tech stack
nuxt
Domain
build-system, frontend
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.