computersmiths logo

Choosing a File Format for Web Graphics

Overview

Nearly all graphics on the Internet are either JPEG (Joint Photographic Experts Group) or GIF (Graphics Interchange Format) format. Other file formats, such as PNG (Portable Network Graphics) exist, but to be sure that the greatest number of browsers can display a graphic, choose either JPEG or GIF. Read Optimizing Graphics for Web Sites for information on how to make your graphics files small for quick downloading.

What's the difference?

Image has . . .

.jpg (or .jpeg) .gif
Number of colors? 16.7 million (24 bits) maximum 256 (8 bit), but may have less
Compression? "Lossy" - loses quality, variable Fixed, lossless
Transparency? None May have single "transparent" color
Animation None May have multiple frames to cycle
Interlaced? No Interlacing display will show every other horizontal line on first pass

Using JPEG File Format

Normally, consider .jpg files for:

Using GIF File Format

Consider .gif files for:

Choose the smallest acceptable image

Experiment with different compression on .jpg files to find the smallest, acceptqble quality image (smaller the image becomes, the worse it looks). A good rule to follow for selecting between a .jpg or a .gif - "Unless there is a requirement for one of the special features, choose the format that is smallest file size for acceptable image quality."

Know Your Audience

Knowing who will be seeing the graphic will help you determine which file type to use. Among the questions you might ask about your audience are the following:

Consider the Total Size of Your Web Page

Although estimates vary, many Web page designers suggest that you keep the total size of a Web page from 40 KB to 60 KB for most purposes, and not more than 75 KB. Microsoft FrontPageŽ provides tools to help you determine both the total size of a Web page, and which pages in your Web are slowest to load. In general, .jpg files are smaller than .gif files for the same content unless the image has a small number of colors. Many imaging programs will show both the size of the image, and estimate time to download with a specified modem.

If your Web page is devoted to a graphics product, or to other graphics-intensive subject matter, you can make large graphics files available and still have the page load quickly by using thumbnails. The thumbnails can be buttons that readers click to see full-size versions of graphics. FrontPage 98, 2000 and 2002 offer the AutoThumbnail tool to help you easily convert any graphic to a thumbnail.

Determine the Purpose of the Graphic

Determining the purpose of a graphic is the first step in choosing one. Graphics on Web sites can serve any of the following purposes:

The purpose of the graphic will help determine its size, file format, style, and appearance. Before you begin to work on a graphic, ask yourself if the graphic adds something to your site. If the answer is no, don't use the graphic.

Alternatives to Graphics

If your goal in using a graphic is to catch a reader's eye, you can sometimes accomplish the same purpose in ways that will reduce file size and download time. The following list describes some alternatives to graphics.


email box Send e-mail to RandySmith@mpc.edu