I was following the tutorial (https://svelte.dev/tutorial/dynamic-attributes) to import local image files. But it didn't work. The image was not found in the app.
Where do I need to locate these images in order to make it works as in tutorial?
let src = './images/background.jpg'
.
.
.
<img {src} alt="background image" />
The browser showed Image not found.
Put your images folder in public folder then reference like this:
<img src="images/background.jpg" alt="background image" />
Or
let src = "images/background.jpg";
.
.
.
<img {src} alt="background image" />