Comments (6)
Sorry for the late response. As you know Image module is WIP and the current version does not support assets. You should put your images inside static
directory. But in the next release (ASAP) it will support assets too.
I recommend to not use Image module on production or real projects. Wait until official announecment. The alpha release may have BREAKING CAHNGES for good.
from image.
With <nuxt-image>
you dont need to use require
image. Nuxt image automatically look for the image. In your case, you should change your code to this
<div v-for="image in product[0].images" v-bind:key="image.rank">
<nuxt-image :src="`/images/shop/${image.image_570xN}`" />
</div>
from image.
Thank you for your reply @farnabaz
Unfortunately the images are still not found. Are the images best placed in the assets folder? I noticed you removed this from the url.
from image.
Also experiencing this issue with dynamic images. This error happens with or without require().
from image.
Images should be placed in the static
folder and referenced with leading forward slash - for example /image.png
would be located in ~/static/image.png
. This is because these images are not part of your webpack build and shouldn't be require
d.
I'm going to close this issue as I can't reproduce with the recent releases but if anyone is still experiencing it, please do comment with a reproduction and I'll reopen and investigate.
from image.
Seems there is an option to be able to use the static directory https://image.nuxtjs.org/api/options#dir
from image.
Related Issues (20)
- Just don't work HOT 1
- img render size issue
- Providers not being built into nuxt output
- Nitro preset 'Azure' gives 404 HOT 3
- Nuxt Image and Cloudinary Provider- Animated GIF support
- sizes based on viewport-height unit
- Unable to read static Image files in /public using IPX as provider on vercel, seeing [404] [IPX_FILE_NOT_FOUND] error HOT 3
- Images appear to double up? HOT 1
- Incorrect deploy-manifest.json when building for AWS Amplify?
- Massive issue with `sizes` affecting Tailwind and other frameworks.
- netlify image CDN uses `jpeg` while only `jpg` is valid
- Provider Hygraph has a new Asset API that breaks the implemented provider settings HOT 1
- Unable to execute generate or build successfully(ERROR: Exiting due to prerender errors) HOT 1
- useImage() in combination with Sanity provider generates a broken, incorrect image path
- The NuxtImg and NuxtPicture components can't be dynamically imported anymore HOT 1
- See error if src is undefined. HOT 3
- random 403 errors Ipx HOT 1
- Alias configuration is invalid
- Placeholder slot for `<NuxtImg>`
- Feature Request: option to disable image density warning HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from image.