Embedding Local Images in Google Earth (since the Update)

jim

http://www.google.com/earth/index.html

Once upon a time, not so very long ago, Google Earth users such as ourselves could embed images into a Google Earth balloon by referencing an image that was already hosted online. When Google Earth 4.0 came along, many new features were added, most notably, the capability to include local images in Google Earth balloons with a little HTML. This used to work:

<img src=”C:\Users\jholland\Desktop\mountain.jpg”>

Photo by Templarion

By inserting this line of code, the image would be saved within the KMZ file (using the “Save Placemark…” menu item). That was totally awesome!

When Google Earth updated (somewhere around version 5.2 or so), this capability was lost. Grrrr! We scoured the blogs, forums, and help documentation for an easy solution but were left puzzled. That is, until about 6 months ago I really got to experimenting. My thinking was that Google Earth acts as a browser, much like Firefox or IE (who is seriously using IE these days?). With that in mind, I tried referencing an image the way you can reference a file in your browser’s address bar. And look what I found that actually works:

<img src=”file:\\\C:\Users\jholland\Desktop\mountain.jpg”>

That was simple! <Press “Easy Button” here>

Of course, you can still reference a hosted image using the same syntax:

<img src=”http://farm1.staticflickr.com/15/22441244_3f311eabd8.jpg”>

And don’t forget, you can adjust the width and/or height of the image with a simple size attribute. Tip: You only need to specify either the height or width. Google Earth will maintain the aspect ratio of the image automatically!

<img src=”http://farm1.staticflickr.com/15/22441244_3f311eabd8.jpg” width=400>
or
<img src=”file:\\\C:\Users\jholland\Desktop\mountain.jpg” height=525>

More HTML tags can be used inside Google Earth balloons. For more information, check out our Advanced Google Earth handout on our Presentations page!

BTW- we have found no way in this world to do this on a Mac! The above methods won’t work because of the difference in the way the Mac OS references files. Once the KMZ is built, of course you can view it on a Mac. And you can insert online, hosted images using a Mac (using the directions above). But we have not found a way to take a local image from a Mac and insert it into a Google Earth balloon. If you find a way to do this, please let us know!


Leave a Reply