Skip to content

Commit

Permalink
Update faq.md
Browse files Browse the repository at this point in the history
Update FAQ to include a section about inline asset URLs, as discussed in the following issue: sveltejs#863
  • Loading branch information
JorensM committed May 6, 2024
1 parent 19a49f6 commit a938c2c
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions docs/faq.md
Expand Up @@ -237,3 +237,9 @@ 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 do I manually specify an <img/> 'src', or any other asset, with an inline URL?

Currently, Svelte does not support inline asset URLs, you can only specify it via an imported asset.

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 comments on commit a938c2c

Please sign in to comment.