diff --git a/docs/faq.md b/docs/faq.md index 53466dd9c..fb944c2dc 100644 --- a/docs/faq.md +++ b/docs/faq.md @@ -237,3 +237,17 @@ See the faq about [vite and prebundling](#what-is-going-on-with-vite-and-pre-bun > [svelte-package](https://kit.svelte.dev/docs/packaging) which already supports it. > > For backwards compatibility, you can keep the `svelte` field in addition to the `exports` condition. But make sure that both always resolve to the same files. + +### How can I use relative paths for asset references in svelte components like `` + +This is not supported out of the box. To resolve assets, you have to either import them like this: + +```html + + +``` + +or use a separate tool to add this functionality. +The 2 recommended solutions are [sveltejs/enhanced-img](https://kit.svelte.dev/docs/images#sveltejs-enhanced-img) (only for image elements) and [svelte-preprocess-import-assets](https://www.npmjs.com/package/svelte-preprocess-import-assets) (for all asset URLs).