tauri icon indicating copy to clipboard operation
tauri copied to clipboard

[docs] What is everything that's required to load an image in V2?

Open zoaha opened this issue 1 year ago • 0 comments

correct me if mistaken but, the preferred and fastest way to load an image from disk for displaying is to use convertFileSrc() but the documentation is outdated, referencing v1 configs that don't exist anymore: image https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/core.ts#L163

it would also be good to have an explicit example of what's needed for it to work. like:

{
	"app": {
		"security": {
			"csp": {
				"default-src": "'self' asset: http://asset.localhost",
				"media-src": "'self' asset: http://asset.localhost",
				"img-src": "'self' asset: http://asset.localhost"
			},
			"assetProtocol": {
				"enable": true,
				"scope": [
					"$DOWNLOAD/**"
				]
			}
		}
	}
}

zoaha avatar Aug 24 '24 05:08 zoaha