nuxt / nuxt/image

Image is in _ipx folder and can't be found

Open
#354 16 comments 1 reaction 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

When building my solution it tries to reference the images in a missing _ipx folder.

<source type="image/webp" 
srcset="/_ipx/images/stock_collage.png?w=320&amp;f=webp 320w, 
/_ipx/images/stock_collage.png?w=640&amp;f=webp 640w, 
/_ipx/images/stock_collage.png?w=768&amp;f=webp 768w, 
/_ipx/images/stock_collage.png?w=700&amp;f=webp 700w, 
/_ipx/images/stock_collage.png?w=700&amp;f=webp 700w" 
sizes="(max-width: 320px) 100vw, (max-width: 640px) 100vw, (max-width: 768px) 100vw, (max-width: 1024px) 700px, 700px">

This is my (relevant) configuration. I've tried with the default configuration, but whatever I do nuxt-image tries to reference _ipx folder.

export default {
  ssr: false,
  target: "static",
  buildModules: [
    '@nuxt/image',
  ],
  image: {
    staticFilename: '[publicPath]/images/[name]-[hash][ext]'
  },
}

This is the html element:
<nuxt-picture format="webp" sizes="xl:700 lg:700 md:100vw sm:100vw xs:100vw" src="/images/stock_collage.png" />

Why is nuxt-image referencing non existent _ipx folder?

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 @nuxt/image configuration using ssr: false, target: "static", and the staticFilename setting, then trace how the element produces /_ipx URLs. Compare the generated references with the static build output. Done means the built page resolves its image URLs without a missing _ipx folder.

Written by the indexing model from the issue text.

Assessment

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