arnoson/kirby-vite

How to access images?

Closed this issue · 2 comments

How to access images in src/assets? I'm experimenting with the snippets file and want to include an image. How can I access them, it always says 404 when I import them via src="assets/images/logo.png.

Since you don't reference these specific assets from js/css vite can't know about them and so they are just normal kirby assets. So you can handle them just how you would handle assets without vite.
Also see arnoson/kirby-vite-multi-page-kit#10 and arnoson/kirby-vite-basic-kit#2

Thanks for the answer - now it works. Such a good kit!