-
Notifications
You must be signed in to change notification settings - Fork 289
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
Nuxt Generate does not produce images #215
Comments
Do you mind creating a reproduction sample using template.nuxtjs.org ? |
Having a similar issue publishing to Vercel. |
@farnabaz Replicating my code on template.nuxtjs.org resulted in the module working how it should. After going through the code and trying to spot differences it looks like having |
I confirm the same bug on Vercel. |
To be fair, I can't get it to work on "npm run generate" either, which is what Vercel is using to generate the site. |
There is probably something wrong with the package here. At least I think so. I have tried 2 versions. Vercel based on: https://github.com/nuxt/nitro-demo Neither the generated version nor the server version works with displaying images using this package. nuxt/vercel-builder#548 ping @pi0 You have created this integration. Do you have an idea what could be wrong? |
For what it's worth I was able to get it working on local dev with "npm run generate" and on Vercel with the following config:
|
The key for me was |
I might have a similar issue I am running nuxt generate on Vercel and it seems to be working fine but when I run |
Would you try again with 0.4.8 and prepare a reproduction if it's still not working? 🙏 |
We saw the same issue, as described above and after updating to
@danielroe This is a really cool feature to have, thanks for putting in the work! |
Great! 🎉 I'm going to close this issue as resolved but let me know if this issue reoccurs and I'll reopen. |
I confirm what @dannyalder88 spotted: if |
Hi @danielroe, I am still facing this issue on 0.5.0 My configuration is:
I have the following code: and placed the logo.png in the static folder. When I run This happens also if I deploy the app (currently using AWS Amplify). |
Make sure you set |
I can confirm as per @danielroe 's suggestions you need to have both Someone should document this. (Shuffles away into the darkness). |
You should also verify that the component inside which you use <nuxt-img/picture gets generated into the static .html files. I mistakenly initialized the piece of code where I was using nuxt/image in the |
Will this issue still exist when migrating to Nuxt 3 ? I would love to benefit from Nuxt Image with a generated site but most providers like Cloudinary are really pricy, will there be a way to work with Nuxt Image and locals images in Nuxt 3 ( |
I'm maybe seeing the same issue? "yarn generate" on my dev machine works fine, and generates the I'm using |
@garyo - lots of similar issues reported around. Seems to happen when running on non-local envs, but have not been able to track down why |
Same issue here as @garyo, works on local but pushing to non-local the images are not built. |
Same issue here as @garyo here |
Same issue. |
one possibility is that if you are implementing responsive design using |
Using "Nuxt": "^3.6.5" and "@nuxt/image": "^1.0.0-rc.1", nuxt generate does not seem to generate static images. In Locally everything works, here is an example of the file produced: |
BE CAREFUL WITH CONDITIONNAL RENDERING: I used v-if for a component with NuxtImg inside of it, when i just change to v-show it generates my img inside ipx folder... maybe it's because v-show generates the DOM of my component but not the v-if. Also i used NuxtImg inside LToopTip of leaflet and it doesn’t work as well (inside v-for) so i just change to default html Info :
Maybe related problem: |
Do the following Install: Config: And in your image call use: And be happy! |
The NuxtImg module does not create the requested sizes on generate when a v-if conditional is used. [1] With v-show it works, but then the 'Back' button of card is not properly layouted. For now instead just use a raw img tag for the label. It has a small size anyway. [1] nuxt/image#215 (comment)
The NuxtImg module does not create the requested sizes on generate when a v-if conditional is used. [1] With v-show it works, but then the 'Back' button of card is not properly layouted. For now instead just use a raw img tag for the label. It has a small size anyway. [1] nuxt/image#215 (comment)
The images for the phones are not generated. That is likely due to conditional rendering with the device selection. This is a similar problem as with 4b71d9e and has been noted in an issue ticket upstream at [1]. [1] nuxt/image#215 (comment)
The images for the phones were not generated because they are only reached by a device selection at runtime. This is a similar problem as with 4b71d9e and has been noted in an issue ticket upstream at [1]. To still create the files wheng generating the static page, we simply add the missing ones to the ARM download page in a hidden state. [1] nuxt/image#215 (comment)
The images for the phones were not generated because they are only reached by a device selection at runtime. This is a similar problem as with 4b71d9e and has been noted in an issue ticket upstream at [1]. To still create the files wheng generating the static page, we simply add the missing ones to the ARM download page in a hidden state. [1] nuxt/image#215 (comment)
The images for the phones were not generated because they are only reached by a device selection at runtime. This is a similar problem as with 4b71d9e and has been noted in an issue ticket upstream at [1]. To still create the files wheng generating the static page, we simply add the missing ones to the ARM download page in a hidden state. [1] nuxt/image#215 (comment)
Nuxt version: 2.15.3
@nuxt/image version: 0.4.4
target: 'static'
I have been using the module in dev mode with no problems. However, when trying to generate a static site using
nuxt generate
no images are produced by @nuxt/image and all images on the site 404. The generated image URLs point to _ipx/IMAGE_PATH but this is not in the dist folder of the Nuxt project.I have tried with a fresh Nuxt project with only @nuxt/image added and get exactly the same issue. Running
nuxt generate
produces no errors in the CLI and the site builds without a problem. The images are just not generated.Any help on this would be greatly appreciated.
The text was updated successfully, but these errors were encountered: