0

I am trying to display the images of a layer with the "map tip" function.

The absolute path of each picture (D:\ ... \ ...\...jpg) is written in a field called "path".

I tried to build the HTML code thanks to other posts, but I can't display the image.

Is this code correct?

<div style="width:400; height:400">
<img src= [% "path" %] " width="400"></img>
</div>
3
  • Did you try to replace the [% "path" %] with the actual path of one of your image to see if that work ?
    – J.R
    Sep 14 at 10:10
  • I tried it and it doesn't work. I see a blank image with a blue question mark. This path is correct because the QGIS module/widget "attached" is configured correctly and works. Sep 14 at 10:40
  • I had gotten the idea from there, but I discovered the catch. It was missing some : " ". Attached is the working code. Sep 14 at 11:53

1 Answer 1

1

I fixed the code, this works:

<div style="width:600; height:600">
<div><img src= "file:///[% "path" %]" width="600" /></div>
</div>

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