Skip to content
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

No way of using dynamic images #13246

Closed
Bryanoxx opened this issue Jan 13, 2022 · 1 comment
Closed

No way of using dynamic images #13246

Bryanoxx opened this issue Jan 13, 2022 · 1 comment

Comments

@Bryanoxx
Copy link

Bryanoxx commented Jan 13, 2022

Environment


  • Operating System: Linux
  • Node Version: v16.13.1
  • Nuxt Version: 3.0.0-27366343.1d741cb
  • Package Manager: yarn@1.22.17
  • Bundler: Vite
  • User Config: css, build
  • Runtime Modules: -
  • Build Modules: -

Reproduction

https://codesandbox.io/s/competent-monad-2dhl6?file=/app.vue

Describe the bug

An image with a dynamic src attribute will not work, for example :
<img :src="imgPath" />

In Nuxt 2 the fix was to use require(imgPath) around the variable, but it does not exist under Nuxt 3 and the import(imgPath) or import.meta.globEager(imgPath) don't work too.

There was already a discussion about this but no issue, that's why I'm creating it.

Thank you for the great work with Nuxt 3 🙏

Additional context

No response

Logs

No response

@danielroe
Copy link
Member

let's track in #12806

@danielroe danielroe added the 3.x label Jan 19, 2023
@danielroe danielroe transferred this issue from nuxt/framework Jan 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants