I have the following:

  1. a layer in QGIS
  2. points
  3. three columns of data
  4. and an image.

When I export to .kml, via client request, it loads fine in Google Earth and shows all the points, but when I click on a point I see the file name and not the image. I have been playing with adding a calculated field but no luck.

How do I create a field with an expression that will display the image when exported?

  • 1
    Could you please provide us with a screenshot. It is most probably because the path is not correct, perhaps relative path.
    – GforGIS
    Commented Jan 6, 2022 at 2:32
  • Maybe this helps: gis.stackexchange.com/questions/326372/…
    – Erik
    Commented Jan 6, 2022 at 8:18

1 Answer 1


You can install the Layer2KMZ plugin in QGIS.


enter image description here

which should save everything correctly.

Remember, that as an output you will have the .kmz file. This is a zipped .kml file, which includes all additional elements related to it. In your case, it will be the image defined I guess.

  • It's showing the image filename xxxx.jpg and not the image which I click on the thumbnail in google earth?
    – Frank
    Commented Jan 6, 2022 at 11:32
  • Have you tried the KMZ? It should include your image thumbnail in the zipped file.
    – Geographos
    Commented Jan 6, 2022 at 11:46
  • Yes I installed the plugin created the kmz. When I load in google earth has the info in the fields of the layer, shows the filename of the .jpg, but doesn't display the image. If I add the following code to a new field - <img style="max-width:500px;" src="file:///C:/Users/fjpan/Documents/Pole suvey/local_file.jpg">. It display the jpeg in the kml, but I'm trying to avoid manually doing this for every entry.
    – Frank
    Commented Jan 6, 2022 at 13:29
  • Hmm... Maybe not manually. Install Notepad ++ or Visual Studio Code. Then by following these instructions: mkrgeo-blog.com/… you could change the image path quickly as long as each of them is in one directory.
    – Geographos
    Commented Jan 6, 2022 at 13:56

Your Answer

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

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