I have a set of point features in an ArcGIS file geodatabase. I have attached a photo to one of the points, using the built-in tools 'enable attachments' and 'add attachment'. The photo is stored on my local drive and should be copied to the GDB when 'add attachment' is run.

If I click on an HTML pop-up in ArcMap the image is correctly associated with the point. However, when I export the layer to a KMZ ('layer to KMZ'), the image does not appear in the resulting KMZ file. Oddly, the photo file name is correctly added to the KMZ pop-up.

Note: the KMZ export tool otherwise correctly works. The photo is less than 1 MB so size should not be an issue. I have found tutorials that suggest a similar workflow, but do not encounter this problem. I also manually inserted the full photo filepath in Google Earth by right-clicking on the point, editing its properties, and saving the KMZ again. Unzipping the KMZ shows that the image is not saved with the KMZ though.

Has anyone else run into an error with this ArcGIS tool or Google Earth and found a work around?

1 Answer 1


Right now, the tool will not pull the attachment out and put it in the output KML file. This is currently logged as a bug/enhancement : NIM085505 -Conversion to KML; attachments in HTML popup should carry over to KML

We don't have a timeframe for when/if this will be done.

I can't comment on the "save" method inside GE to put the image inside. You may have to take it a step further and put the file into a directory, reference the file properly inside the doc.kml, then zip everything up as a .KMZ

EDIT - Based on the above code, a tool was created that performs the extract and injects the code to automatically add images into the KMZ file. The tool can be downloaded from arcgis.com here

  • Thank you for bringing this to my attention. I found that referencing the photo inside the KMZ does not work. Instead, I had to unzip the KMZ, create a folder named 'files', copy the image into this file, reference the image using <IMG SRC =[name here].jpg >, and then re-save as a KMZ. This works, but is very slow. As a side note, I previously referenced images stored online by inserting complete URLs in the original feature class table. However, there was an awkward pause before they would load, due to slow internet, so also not ideal.
    – Dan
    Oct 23, 2014 at 3:15
  • Hey @Dan could you email me ( khibma @ esri.com ) - I built a tool that might do what you want. I'll send it to you. If it works, I can put it up on arcgis.com as a sample.
    – KHibma
    Oct 23, 2014 at 19:52

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.