Images are used to enhance the experience of whatever you are including them into, and can be included in an email or website in several ways. You can specify a background image of a particular element (which allows you to take advantage of spritification), or the <img> HTML element allows you to simply specify a source.
Regardless of the method, the source can be described with either a URL or through the Data URI Scheme.
Base64 is an encoding scheme that can be used to describe binary data, via a string format. Base 64, obviously implies that the string data is translated into radix-64 representation, which means that there is some overhead in the overall weight of the result.
There are various reasons to use and not to use base64 encoding of your binary data, many of which are discribed on Wikipedia. Make sure you read the see the various advantages and disadvantages to utilizing base64 encoded data for your images.
This tool allows you to specify a target URL of an image that will then simply be converted into a base64 string. There are some examples of ways to include it into HTML at the bottom that you can conveniently copy and paste into your code. Hopefully this will help.
<img width="162px" height="64px"
src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAKIAAA..."/>\>
.image {
width:162px;
height:64px;
background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAKIAAA...);
}
Nirvana Tikku, Tikku.com © 2010-2012