Reputation: 723
This is a very simple SvelteKit program:
<img src="static/bird.jpg" alt="a bird"/>
When I run it with npm run dev
, the image is displayed.
But when I use npm run build
and npm run preview
, only the alt text is displayed.
What can be the cause? It looks like this.
I use SvelteKit v1.0.0-next.107
Upvotes: 3
Views: 1943
Reputation: 723
I have found the solution:
<img src="/bird.jpg" alt="a bird"/>
Path without static
.
Upvotes: 9