Image absolute path

Trying to work out in which folder to put my images to load into an image widget. The docs say File url or absolute path. How do I use absolute path with o-s-c? I cant work out the directory structure. I checked with dev tools and its using my local IP as the base directory…could I use relative paths too? Where do I need to store my images? I’m on windows by the way. Thanks so much.

On windows an absolute path looks like C:\path\to\image.jpg, the directory structure is your system's.

could I use relative paths too

No, only urls (http://etc...) or absolute file paths.

There seem to be an issue with windows absolute paths actually, I’ll look into it.

I tried this for a panel

>.panel{ background:url('C:\image.jpg'); }

and the panel turned gray but didn’t show the image…
on inspection, chrome showed me

background: url(http://192.68.etc.etc:8080/C:image.jpg)

background: url(http://192.68.etc.etc:8080/C:image.jpg)

The http:// part is expected, it's supposed to be resolved on the server side. Now as I said there's an issue with windows paths.

I’ve been giving this some thought and I’ll have to change this in next release: I think file paths should always be resolved relatively to the remote-root option introduced in v0.44.0 (which defaults to the user’s home directory).

Edit: kind of thinking out loud here, this might need some more tinkering before getting done right…

So at the moment, it's not working correctly?

Yes, I’ve opened a bug report : https://github.com/jean-emmanuel/open-stage-control/issues/515

The bug is fixed in v0.45.5, as for always resolving path relatively to the remote-root I’ve chosen a softer approach that mitigates security risks while ensuring retro-compatibility: absolute path requests are now only allowed for images.

Just revisiting this. I have been relative img paths, but thought I’d have another go at absolute paths. I’m still having trouble getting absolute paths to show in an image widget. Is this intended as a security issue? I have tried

C:/img.jpg
C:\img.jpg
C://img.jpg
C:\img.jpg

I confirm, the absolute path detection mechanism broke with the engine update. Fixed in local git repo.

It should be fixed in v0.49.4.