On the World Wide Web, download speed and file size are everything. Being able to use file compression when developing a website can give your projects an edge. Web Designers are mainly concerned with the size of image files used in their projects. Since a Web Designer’s audience must download web pages, having a huge hard drive available will offer no advantage but file compression will.
There are 3 file types a web designer will most likely be working with. They are the JPG or JPEG, the GIF and the PNG files. We want to make our files smaller so that they load faster in a browser. At the same time we want minimum image degradation. There are generally 2 different types of file compression, lossy and lossless. With lossy, some image data from the original image is lost during compression while lossless does not lose any data.
Instead of getting into the details of compression here, it’s important to know what sort of images are best for each file format so you can balance minimum size and best image quality. GIF must be used with animation. This is also well suited to images that contain line drawings and simple graphics. JPG is good for photographs with limited contrast and screenshots of movies and games. PNG which usually is a relatively larger file size is best suited for photos with high contrasts, transparency or detailed diagrams.
For more detailed information, here is the site I visited for an image compression review: http://www.noupe.com/design/everything-you-need-to-know-about-image-compression.html