Giter Site home page Giter Site logo

Comments (6)

farnabaz avatar farnabaz commented on May 9, 2024 5

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.

farnabaz avatar farnabaz commented on May 9, 2024

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.

illustratordavid avatar illustratordavid commented on May 9, 2024

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.

stuible avatar stuible commented on May 9, 2024

Also experiencing this issue with dynamic images. This error happens with or without require().

from image.

danielroe avatar danielroe commented on May 9, 2024

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 required.

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.

mklueh avatar mklueh commented on May 9, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.