Tuesday, April 6, 2010

P4C: Adding Photos to Descriptions

With that URL for an image we grabbed last week, it's time to add the image into a cache or trackable description. We'll need to use some very basic HTML to use that URL. While the trackables use HTML code by default in their descriptions, cache descriptions require that you set a checkbox on the cache editing page to allow the HTML code. Starting from the edit page for your cache, just under the "Details" heading look for the "The descriptions below are in HTML" checkbox and make sure it is selected. Now you're ready drop in the HTML code to show your image in the description.

The most basic way to include the image in the description is by entering the following:
<img src="URL">
(the URL should be the image URL you grabbed from last week's article). This simple drops in the image inline with the text as formatted. To get it on it's own line, add line breaks in front and behind, so it looks like this:
<br><img src="http://host.com/image.jpg"><br>
If you'd rather, and I generally do, you can have the text wrap around the image by placing it at either the left or right (I should note that once support for IE6 is terminated on Geocaching.com there are better ways to do this) by adding align:
<img src="http://host.com/image.jpg" align="right">
It's generally best to size the image before upload, but you can have the browser do the work through the image tag by adding width and height:
<img src="http://host.com/image.jpg" width="50%" height="50%">
This can be especially useful by linking to the full size image allowing the user to click through:
<a href="http://host.com/image.jpg"><img src="http://host.com/image.jpg" width="50%" height="50%"></a>
Of course there's much more you can do with HTML and even the image tag, so this is just the basics of how to get in and add the image to the descriptions. For more information about the image tag and it's usage check out w3schools.com. I highly recommend playing with these commands on an unpublished listing to see how they work and test to see if they're compatible. There's a bunch of good information about HTML and it's worth checking out to improve your listings.

Fortunately that wraps up the information about posting images to Geocaching.com and next week starting talking about the gear. Come back then for information about cameras and some basic gear you'll want handy on the trail. Don't forget that next Monday is the twelfth, another chance to try the 12 of 12.

Text and images in this post are copyright 2010 by Darryl Wattenberg, all rights reserved.

No comments: