Root number of paths

Problem
I’ve issues to get the root number before URL paths to locally stored images inside my vault.

Goal:
I’m trying to reference a path to be used as border-image.

Obsidian uses URL paths to local files, but this path is prefixed by a longer number, example:

app://verylongaphanumcode/home/path/to/vault/and/resource/file.png

Question:
How to calculate the number at the root of paths, after app:// ?

This verylongaphanumcode changes every time you reopen Obsidian app, so it’s not reliable for a long-term storage.

resourcePathPrefix

getResourcePath

Thanks for clarifying :slightly_smiling_face:

In the past it was very easy to add local URLs and use these as path in Style settings.

Sigh.
I hoped to find a way to build useable paths via bash scripting, if possible.
Currently I’ve no knowledge about typescript.

On Windows

file:///C:/absolute/path/to/vault/relative/path/to/note.md
file:///C:/absolute/path%20with%20spaces/to/vault/relative/path/to/note.md

On Linux/MacOS

file:///absolute/path/to/vault/relative/path/to/note.md
file:///absolute/path%20with%20spaces/to/vault/relative/path/to/note.md

Absolutely, these paths work (in a note).

I missed to specify Style settings isn’t able to read these paths, it needs URL('app://verylongaphanumcode/home/path/to/vault/and/resource/file.png')

So my initial question, but if that number changes all times, I better check and correct what’s wrong in the code of that “unmaintained plugin”. I guess this question is “solved”. Thanks for your time!