Now I am trying to get src from object to my vue.js component
export const Quizzes = [
{
firstWord: "happy",
secondWord: "srećan",
imageSrc: "../assets/happy--women.jpg",
},
]
my data.js file looks like this
and how can i use this in my Vue.js component
<img class="happy-women" src="../assets/earth.jpg" alt="Quiz Image" />
here instead of src link
Quizzesis added to your component but say you have it as an array in your component, you bind the<img>src like so:<img :src="Quizzes[i].imageSrc">. The index of the array can be from av-fordirective or some other logic inside your component