Trying to access images via img url that are in a network drive #12526
Unanswered
scottdrichards
asked this question in
Q&A
Replies: 1 comment
-
i believe the assets protocol is the correct (first) approach, yes. For a test you could use let asset_protocol_scope = app.asset_protocol_scope();
let _ = asset_protocol_scope.allow_file(file_path); |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I am trying to make a photo gallery viewer. I want to give the frontend something like
<img src="/images/thumbnails/2025/dog.jpg" />
and then I would hope there's a Tauri config to mapimages/thumbnails/
to//NAS/thumbnails/
.It appears as though the asset protocol is what I would want (aside: the config docs has a "see more" link that links back to itself). However, it looks like you can only use predefined locations for those assets (in fs scope). Is "assets" the correct approach?
Using tauri v2.
Beta Was this translation helpful? Give feedback.
All reactions