Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

217
Vistas
Vue : How to use v-bind on svg image?

I tried to load a svg image on img tag in two ways. When I use the 1st way then it works well, but when I use the 2nd way then it doesn't work.

How to make the 2nd way(v-bind:) working well?

<template>
    <div>
        <img src="../../assets/ico_refresh-ccwb.svg"> <!-- 1st : working -->
        <img :src="imgSrc"> <!-- 2st : not working -->
    </div>
</template>

<script>
export default {
    data(){
        return{
            imgSrc : '../../assets/ico_refresh-ccwb.svg'
        }
    }
}
</script>
over 4 years ago · Santiago Trujillo
1 Respuestas
Responde la pregunta

0

@niddddddfier you need to prefix your imgSrc property with the require keyword. eg,

data(){
  return{
    imgSrc : require('../../assets/ico_refresh-ccwb.svg')
  }
}
  
over 4 years ago · Santiago Trujillo Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda