How to Optimize Images

(9/29/2006)

Im a big fan personally of the freeware programs Irfanview which does an excellent job of compressing .jpg and .gif images for the web. The Irfanview program can also crop images and resize and is easy to learn and download.

To optimize a jpeg image with IrfanView open the image and select File-->Save As. In the Save dialog there will be a small slider from 0-100, this is where you pick the quality for your .jpg file. Hit save to save the graphic with the new quality. Remember if you give it the same name you will overwrite your original so I highly recommend that you put it into a different folder so you can always revert back if needed. Irfanviews default quality is 80% but on most images you can get away with 70% and the image will still look great.

To optimize a gif image with IrfanView open the image and select Image-->Decrease Color Depth. Now enter in the number of colors and select Ok. The less colors you use the smaller the size of the image will be and the quicker it will load.

Its also important to note that sometimes changing an image from a jpeg to a gif can sometimes signifigantly reduce its size. Images that are photos with alot of colors and detail are usually better as jpeg and simpler images that are drawn with few colors are usually better as a gif.

To resize an image using IrfanView open the image and then select Image-->Resize/Resample. Enter your new size and hit ok. If you keep the preserve aspect ratio box checked the image will keep the right dimensions and wont get distorted.

Once you are done optimizing your images reupload them to your website and you should notice a signifigant decrease in the time it takes to load the pages.

So what do you do if you have thousands of images? This could take a lot of time right? Yes, it would but of course it is worth it however there is good news, you dont have to do the images one at a time. IrfanView offers a batch tool to optimize or resize many images at once. More on that later.

Netmechanic also offers an excellent utility called GifBot, available at http://www.netmechanic.com/GIFBot/optimize-graphic.htm that can optimize your images and it will show you all of the different versions etc upfront. My only complaint about the gifbot is that you can only see one image at a time over the web so for large sites or people with slow connections this could be a slow way to go about it.