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)
- IPX_ERROR
- IPX error 500 with `nuxt generate`
- Absolute Cloudinary URLs do not work
- IPX_FILE_NOT_FOUND when using npm run build
- New provider for Filerobot from Scaleflex
- nuxt-image + glob v9.0 break build HOT 4
- NuxtImg with Nuxt 3.12.1 has error about "#imports"
- Uploadcare proxy feature HOT 1
- Uploadcare problem with xxl/2xl screens
- IPX Static Render Skipped with Custom BaseURL
- IPX images not found when setting nitro.static to true in development
- error code 503 problems why HOT 1
- NuxtImage + IPX + SWR = return buffer HOT 5
- How to do chained transformations in ImageKit? global modifiers in config prevent raw transformation working correctly.
- Can't generate static pages
- npx genarate Äąpx problems HOT 1
- Can not find package ./output/server/node_modules/destr imported from ./output/server/index.mjs HOT 2
- weserv provider doesn't rotate
- 503 (Service Unavailable) HOT 6
- The sizes prop is not displaying correctly according to the documentation 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.