I have a text in an attribute table that contains a file path. I want a hyperlink to be displayed in the information about the object - in blue, underlined - as I saw in this tutorial: https://www.qgistutorials.com/en/docs/3/web_mapping_with_qgis2web.html

I changed the widget type in the attribute form to Text Edit-> Multiline-> HTML but after saving the changes still the object is identified as normal text. Have I done something wrong?

BTW: I have active path open action from this attribute and it works.

1st screenshot

2nd screenshot

  • 1
    could this be realted to the encoding - e.g. see this question: gis.stackexchange.com/questions/458580/…
    – Vincé
    May 8 at 12:51
  • 1
    rename the dashes and dots in your local drive or move your local url to c:/web replaces spaces ect with underscores.
    – Mapperz
    May 8 at 13:02
  • 1
    See my answer, that should work in QGIS. However, exporting to QGIS2Web might not work as style/formatting etc. is not 100% compatible. You might need to re-program at least parts of your map.
    – Babel
    May 8 at 13:10
  • 1
    Just tested: exporting with QGIS2Web to OpenLayers, clicking on the points opens a form with the attributes. Hyperlink works for the URL (feature 3 in my example), not for the filepath (feature 2). Asking about how you can create an URL that works after exporting with QGIS2Web is another question and you should post a new question for that 8you might link to this one here).
    – Babel
    May 8 at 13:14

1 Answer 1


To make sure the filepath is recognized as such and not as a html link, use a file:/// prefix before the actual filepath - like in this example:


Use Ctrl+Click to open the link

Screenshot: feature 1 with no link, features 2 and 3 will open the file/website with Ctrl+Click enter image description here

  • I had the same issue and it kind of worked with your solution - however not for relative paths. The relative paths are shown as a link to a file, but nothing opens.
    – ibdmn
    Jun 5 at 10:17
  • You should post a separate question for that. You can link to this one here.
    – Babel
    Jun 5 at 11:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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