Feature request #12688
relative paths in image source expression
|Pull Request or Patch supplied:||No||Resolution:||fixed/implemented|
|Easy fix?:||No||Copied to github as #:||20794|
I have an atlas with a QR code on each page. the qr codes are jpg images stored in a folder relative to the project root. I use dropbox to sync the project file to multiple users / computers.
The qr filenames are attributes in a field. (i.e. "001.jpg", "002.jpg" etc..)
I used expression builder to concatenate the strings to a usable path:
'c:/path/to/my/project/qr/' || "fileName"
which works fine but I want it to be portable so instead I would like to be able to use:
'qr/' || "filename"
but it doesn't work. I created a workaround using a python function that returns the current path:
$currentpath || '/qr/' || "filename"
which works ok but then I have to put the function in every new computer I access the file from.
ultimately it would be more intuitive and work better if the relative paths just worked (or if there was a current path variable to concatentate to)