-1

I am using QGIS Expressions for showing images in DISPLAY hints:

After some trail and error the following works:

<img src= "file:///[% @project_folder || to_string('/BILDER/') || "BILD" %]">

where BILDER is the folder with the images and BILD is the field in the attribute-table, which contains the image-names like pic1.png.

I did look at the official documentation: https://docs.qgis.org/3.34/en/docs/user_manual/expressions/expression.html but I could not find any information about:

A) file:/// , why do I have to use it in the html-image-tag in QGIS? In any html-browser (e.g. Chrome) the source-tag has no file-part, eg:

B) Why do I have sometimes to use [% %] for enclosing QGIS-Expressions?

C) @expression : the @ seems to be necessary for identifying "variables", which can have different values like the "variable" @project-folder. Is this true?

1 Answer 1

2

A) see File URI scheme

B) see 16.1.13. Display Properties and 22.2.4. The Label Item

C) see 13.2.27. Variables

Not the answer you're looking for? Browse other questions tagged or ask your own question.