Skip to content

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

Description

@zoaha

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/**"
				]
			}
		}
	}
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions