Creating images for the Web : Saving images for the Web
 
Saving images for the Web
Because the majority of Web browsers recognize GIF and JPEG images, these two formats are used most often for saving Web images. Newer versions of the Web browsers can also recognize the more recent PNG format, and many Web browsers also support Wireless Bitmap (WBMP) and i-mode formats, which are popular formats for wireless devices.
When you save images for the Web, there are three major considerations: layers, color depth, and file size.
Layers
Because none of the current Web browsers can display layered images, you need to flatten an image before saving it for the Web.
Color depth
Some computers can display no more than 256 colors. If an image on a Web page contains more colors, the Web browser uses its own dithering method to display the image. This can produce color distortion. If you reduce the color depth of the image to 8 bits (256 colors) before placing it on your Web page, its appearance will be more consistent. For more information about color depth, see Working with advanced color features.
Web file formats and file sizes
File size affects the majority of users accessing a Web page. As the size of an image file increases, it takes more time to download, so viewers have a longer wait. You should use a file format that reduces the image size while keeping the quality as high as possible.
Choose from the following file formats when saving images for use on the Web:
GIF — this format compresses line art and images with areas of similar colors. It supports 8-bit (256) color. There are two versions of GIF: 89a, which can save transparency and information, and 87a, which cannot. Both are recognized by most browsers and use lossless compression.
JPEG — this format efficiently compresses photographic images. It supports 24-bit (16.7 million) color, uses lossy compression, and is recognized by most browsers.
PNG — this increasingly popular format efficiently compresses images. It supports up to 24-bit (16.7 million) color and uses lossless compression. It is not as widely used as JPEG, so some features of this format are not available for older browsers.
Wireless Bitmap (WBMP) — this format is used with many wireless devices. The images are black and white and have lossless compression.
What’s the difference between lossy and lossless compression?
Lossy compression is a compression method that eliminates data to reduce the file size. Lossless compression retains all of the original image data and reduces the file size by storing patterns of pixels in the image.
To flatten an image
Edit workspace 
Choose Layers Merge Merge All (Flatten).