nuxt / image

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

Nitro publicAssets 404 #1363

Open woldtwerk opened 1 month ago

woldtwerk commented 1 month ago

When adding public assets to nitro via a hook:

nitroConfig.publicAssets.push({
   dir: resolver.resolve(`${nuxt.options.rootDir}/content/.uploads/media`),
   maxAge: 60 * 60 * 24 * 365,
})

ipx will throw a 404 error. I guess ipx resolves the file directory and doesn't care if the file is reachable under '/'

├─ /ipx//ogimage.jpg (12ms) nitro 10:24:35 AM │ ├── Error: [404] IPX_FILE_NOT_FOUND

My current workaround is to do a symlink instead.