Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

136
Visualizações
Nuxt Dynamic Images wont load

For some reason my dynamic images wont load. I'm keep getting the error:

Cannot find module '@/assets/images/galery/tn-sm/galery-tn-1-sm.jpg' from '/Users/path/code/ck'

The path is 100% correct, I tried it many times, even without dynamic images it worked. So I don't quite understand what the problem here is.

<template>
  <div  v-for="img in imgs" :key="img.id">
    <img :src="require(`@/assets/images/galery/tn-sm/${img.tn_sm}`)" />
  </div>
</template>

<script setup>
const imgs = [
  {
    id: 0,
    url: '',
    tn_xl: 'galery-tn-1-xl.jpg',
    tn_sm: 'galery-tn-1-sm.jpg'
  },
  {
    id: 1,
    url: '',
    tn_xl: 'galery-tn-2-xl.jpg',
    tn_sm: 'galery-tn-2-sm.jpg'
  },
  {
    id: 2,
    url: '',
    tn_xl: 'galery-tn-3-xl.jpg',
    tn_sm: 'galery-tn-3-sm.jpg'
  }
]
</script>

I followed the exact solution as stated here: https://nuxtjs.org/docs/directory-structure/assets/ and tried to put all sorts of characters in front of the url (~/ ../ ./, etc.) Any help would be very appreciated.

about 4 years ago · Santiago Gelvez
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda