1π
β
To use image routes in this way you must first import them for Webpack to be able to process them from the data:
import mathImg from "../assets/Math.png"
// in your data
Lessons: [
{
url: mathImg, // use the import name
Title: "Lesson",
Subject: "Math",
Location: "London",
Price: "Β£100",
Spaces: 5,
}
]
in your template
<img :src="Lessons.url" />
π€innerurge1
1π
I believe you want to bind the src attribute like so:
<img :src="lesson.url" ...>
π€Raymond Camden
1π
I guess you forgot the :
<img :src="`${lesson.url}`" alt="" class="card-img-top img-fluid">
and you also can
<img :src="lesson.url" alt="" class="card-img-top img-fluid">
π€rb_19
Source:stackexchange.com