Skip to content

Commit 5397625

Browse files
JorensMdominikg
authored andcommitted
Update faq.md
Update FAQ to include a section about inline asset URLs, as discussed in the following issue: sveltejs#863
1 parent 76a94d4 commit 5397625

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

docs/faq.md

+6
Original file line numberDiff line numberDiff line change
@@ -237,3 +237,9 @@ See the faq about [vite and prebundling](#what-is-going-on-with-vite-and-pre-bun
237237
> [svelte-package](https://kit.svelte.dev/docs/packaging) which already supports it.
238238
>
239239
> 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.
240+
241+
### How do I manually specify an <img/> 'src', or any other asset, with an inline URL?
242+
243+
Currently, Svelte does not support inline asset URLs, you can only specify it via an imported asset.
244+
245+
2 recommended solutions are to use either [sveltejs/enhanced-img](https://kit.svelte.dev/docs/images#sveltejs-enhanced-img)(only for image elements) or [svelte-preprocess-import-assets](https://www.npmjs.com/package/svelte-preprocess-import-assets)(for all asset URLs).

0 commit comments

Comments
 (0)