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)
- NuxtImg not show image when install with Bun HOT 4
- nuxt2: unable to load SVGs from S3 HOT 2
- image.dir Does not work in production HOT 3
- Responsive images, images based on breakpoint HOT 1
- NuxtImg can NOT load images file which located in assets folder
- How can i generate static images using storyblok as provider ? HOT 1
- Images cannot be parsed when obtained through event handlers
- Images not loading on Netlify HOT 12
- Bug in NuxtImg sizes configuration: Incorrect default size assignment HOT 4
- Bug in NuxtImg sizes configuration: Incorrect default size assignment #2
- Notion s3 url images can't be used HOT 4
- NuxtPicture doesn't accept resize in modifiers
- loading="lazy" don't work HOT 3
- Problem with generating WebP images and modern formats. HOT 1
- Prismic provider with netlify HOT 2
- Remote image path to s3 bucket is not working using Nuxt2 HOT 2
- Disable auto-detection of a specific provider HOT 3
- Missing fit modes on cloudinary provider, and existing ones are wrongly mapped HOT 4
- Add provider for h2non/imaginary HOT 1
- Nitro publicAssets 404
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.