What Image Format Should Be Used on Your Website?
If you want to save more bandwidth on your website, you may need to make wise choice when you consider what image format use on the website. Normally, the image format is divided into two parts, compressed and uncompressed. Obviously, you may use compressed on the web.
On the web today there are three main image format types to choose from and all have their advantages and disadvantages.
GIF
The CompuServe GIF is commonly used to upload documents to the CompuServe Information Service and to pass documents between other types of computers. The idea behind designing GIF files was to create the smallest possible image file for uploading and downloading from electronic Bulletin Board Systems (BBS), thus producing a highly compressed format that minimizes file transfer time over phone lines. Most communication programs (for BBSs and the InterNet) allow the user to download GIF files and view them as they are downloaded. Another advantage to GIF files is transparency. A color within the color table can be selected as the transparent color. In doing so, wherever that color occurs, you’ll be able to see through to the HTML background. One of the largest downfalls to the GIF format is its inability to have a color palette of more than 256 colors. This can create poor looking images when used on a photograph which may originally have thousands of different colors.
JPEG
JPEG is a lossy compression graphic format since its compression economizes on the way data is stored and also identifies and discards extra data, that is, information beyond what the human eye can see. However, in most cases, the difference between the original and compressed version of the image is indistinguishable.
In trying to decrease the file size of the JPEG (for example, when using the quality slider in Photoshop), you'll tend to notice artifacts occur in flat color areas and especially near edges. As a result, JPEG is best used for images that have more of a variation in colors. For example, images with gradients or photographs can handle a lower quality setting with little noticeable loss in quality. Images with text or large solid backgrounds are best left for GIF or gif.
gif
gif is an extensible file format for the lossless, portable, well-compressed storage of raster images. gif is similar to GIF and can also replace many common uses of TIFF. Indexed-color, grayscale, and truecolor images are supported, plus an optional alpha channel for transparency.
gif supports 8. gif supports alpha transparency, whereas GIF only supports one-color transparency. The big attraction to gifs is its ability to do alpha transparency. Unfortunately, Internet Explorer currently doesn't have full support for it, although there are hacks out there that can pull it off. gif and GIF are also very similar in that they both work better with large lines of the same pattern or color. If you do not need alpha transparency but wish to use a color palette greater than 256 colors then you are looking at a 24-bit gif. It'll be important to test between a 24-bit gif and JPEG to see which achieves better results. gif still suffers the same problem as GIF in that they cannot optimize photographs as well as JPEG can.
Is there a winner?
No format is best in all scenarios. Therefore, it's always best to play around with the various formats and compression levels to achieve the best results.
