Open alex00888 opened 2 years ago
Same issue, works in dev mode, but when deployed to cloudflare pages, the images are not shown. My images are also stored in the usual /assets/image directory. The docs are confusing as at one point they say you can change the dir as long as you specific in the nuxt config, but another part of the nuxt image docs say that if you are using default providers for local images you should store them in /public (not /static) .. I tried both options and neither work in production.
any ideas?
I know there are some issues when using directories other than the root public dir https://github.com/nuxt/image/issues/1006
My images are located in another directory, where I put them dynamically. I set 'dir' in config like this:
And it works fine when I run
npm run dev
. But when I build and run the production version, it shows an error:IPX Error: Error: File not found (/home/alex/projects/mattress/front/desktop/.output/public/storage/images/product/2/SZhJRoRZwTBRFiJ7PSBjm1wYhrfxE6qcetboss7s.webp)
Why is it trying to find images in the .output directory?I'm using Nuxt 3 and the latest version of @nuxt/image-edge.