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

image.dir Does not work in production #1320

Open
senher opened this issue Apr 11, 2024 · 3 comments
Open

image.dir Does not work in production #1320

senher opened this issue Apr 11, 2024 · 3 comments

Comments

@senher
Copy link

senher commented Apr 11, 2024

I put my image resources in the resources/images directory
My nuxt.config.ts:
modules: ["@nuxt/image"], image: { dir: "resources", },
in page:
<NuxtImg src="/images/test.jpg" />
It will render
<img src="/_ipx/_/images/test.jpg"/>
It works fine in development mode and the images can be accessed
After npm runs build, the image will display 404 in production mode

"@nuxt/image": "^1.5.0",
"nuxt": "^3.11.2",

@scottyzen
Copy link
Contributor

@senher Is it Netlify? I'm having issues today too.

@scottyzen
Copy link
Contributor

Images are still not working.

Anyone else having issues with images not loading on Netlify? I'm using the same image transformation service that I've been using for a while now and it's not working anymore. I'm not sure if it's related to the changes that were made to the image transformation or redirects on Netlify's side.

Working image

Broken image.

The only difference is the slash after the domain name which you would expect to be the working image.

@senher
Copy link
Author

senher commented Apr 16, 2024

@senher Is it Netlify? I'm having issues today too. 是网络化吗?我今天也遇到问题了

No, I tested it locally and deployed it to a test server,

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

2 participants