Tuesday 18 June 2019

qgis - Using QGIS2Web to display pictures?


I have a problem with displaying an image with QGIS2Web. First, I followed the procedure as given in the link below to pop some images from my photo directory:


Adding hyperlinks to pop-up data in qgis2web


Then I followed the step and typed like this:




CONCAT('')



I put that code in my attribute table (FOTO HTML). enter image description here


After that, I used QGIS2Web plugin to produce webpage for my map and it doesn’t end up with what I expected, like this: enter image description here


Does anyone have suggestions to solve this problem?



Answer



You are using absolute path "E:/haris pictures/TL0101.JPG", where it should be a relative path to the index.html file that you are using.


In the link that you are referring: "../images/Name.JPG", the ../images is the folder name located one level up with the relative to the index.html file.


Please note that you forgot also to add another double quote " surrounding the path of the images in your question. Also the img src tag should not be surrounded by single quote '. Here is the correct syntax I am referring from the same link you provided:


Alias Name

No comments:

Post a Comment

arcpy - Changing output name when exporting data driven pages to JPG?

Is there a way to save the output JPG, changing the output file name to the page name, instead of page number? I mean changing the script fo...