Hi guys now I am building a quiz app in which you should find the English version of a word by seeing an image and description under the image
My data.js file is like this.
export const Quizzes = [
{ firstWord: "happy", secondWord: "srećan", imageSrc: "happy--women.jpg", },
{ firstWord: "lijepo", secondWord: "nice", imageSrc: "nice-women.jpg" },
]
and I am importing it into my component like this
import { Quizzes } from "../data";
and binding it to a variable like
data() {
return {
quizItems: Quizzes,
};
},
and using it in my tags like
<img class="quiz-image":src="'../assets/' + quizItems[currentCount].imageSrc"alt="Quiz Image"/>
<p class="quiz-word">{{ quizItems[currentCount].firstWord }}</p>
in this case quizItems[currentCount].firstWord is working but img biding is not working in this case the browser gives me an error like happy--women.jpg:1 GET http://127.0.0.1:5173/assets/happy--women.jpg 404 (Not Found)
please can someone help me in this case