nuxt / image

Plug-and-play image optimization for Nuxt applications.
https://image.nuxt.com
MIT License
1.28k stars 253 forks source link

IPX_FILE_NOT_FOUND when using npm run build #1378

Open jtlindsey opened 2 weeks ago

jtlindsey commented 2 weeks ago

Bug

Images with non-url friendly characters in filename can't be found during npm run build.

Min reproduction repo

See components/MyImages.vue and nuxt.config.ts

Example of filename with + in name is escaped in content during build but original filename not changed or referenced. File not copied to .output/public/_ipx/.. as f2-a%2Bmber-kipp-75715CVEJhI-unsplash.jpg.

Actual file name f2-a+mber-kipp-75715CVEJhI-unsplash.jpg

Errors prerendering:
  ├─ /_ipx/** (6ms)                                                       nitro 7:31:20 PM
  │ └── Error: [400] IPX_MISSING_ID
  ├─ /_ipx/w_400/example/f2-a%2Bmber-kipp-75715CVEJhI-unsplash.jpg (8ms)  nitro 7:31:20 PM
  │ ├── Error: [404] IPX_FILE_NOT_FOUND
  │ └── Linked from /
  ├─ /_ipx/w_800/example/f2-a%2Bmber-kipp-75715CVEJhI-unsplash.jpg (8ms)  nitro 7:31:20 PM
  │ ├── Error: [404] IPX_FILE_NOT_FOUND
  │ └── Linked from /