Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

'dir' not working in production mode with ipx #573

Closed
alex00888 opened this issue Jul 17, 2022 · 3 comments
Closed

'dir' not working in production mode with ipx #573

alex00888 opened this issue Jul 17, 2022 · 3 comments

Comments

@alex00888
Copy link

My images are located in another directory, where I put them dynamically.
I set 'dir' in config like this:

    image: {
        dir: process.env.IMAGES_PATH
    }

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.

@ricky11
Copy link

ricky11 commented Sep 10, 2022

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?

@blowsie
Copy link

blowsie commented Feb 14, 2024

I know there are some issues when using directories other than the root public dir
#1006

@Baroshem
Copy link
Collaborator

Closing in favor of #1006

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants