Images intended for viewing on web pages have to be kept small in file size, or download times become overly long and potential visitors or customers grow tired of waiting and leave. (Web surfers are not generally a patient bunch.)
To help speed page loading, images are compressed for use on the web. At present, GIF (Graphical Interchange Format) and JPEG (Joint Photographic Experts Group) are the image types supported by most web browsers so images should be converted to one of these formats for web use. These formats compress files differently and each has advantages and disadvantages.
![]() gif (52k) | ![]() jpg (17k) |
GIF compression gives smaller file sizes and better quality for graphic images with large areas of solid colors and uncomplicated backgrounds. It works very well for titles, logos, and other simple graphics with few details and no tonal gradations such as the example below. |
JPEG compression gives smaller file sizes and better quality when used with images that have gradual transitions from light to dark, subtle tonalities or many fine details such as the photographs above. |
![]() gif (4k) | ![]() jpg (17k) |
With very small images such as typical icons, bullets, or buttons, the difference in file size between GIFs and JPEGs becomes insignificant.
Another important difference between the two formats is that GIF alone supports additional features such as transparency and multiple image animation.
<< Images In HTML Documents | Index | Site Structure and Paths >>