Want your website's pages to load faster? Want to pay less for web hosting bandwidth? Optimizing your images for the web can help with both.
What is optimizing images?
Optimizing images is to make sure your images file sizes are no larger than they have to be. You want your pictures to show all of their detail to your website's viewer, but files that are too large will slow you pages down and cost you money when you pay for web hosting.
Many webmasters make their pictures larger than they need to be. Sometimes you'll see them reduce the size of a file with the 'height' and 'width' attributes of the < img > HTML tag. If you're using the height & width attributes to make your images smaller than they would appear, you're better off resizing the images in your editing program for an exact fit. Your website visitor doesn't see any change - except your page loads faster. Your web hosting company will thank you, they don't use as much bandwidth delivering the smaller file. Remember though to keep the height & width attributes. Just because you're using the image full-size in your page doesn't excuse sloppy HTML coding.
There's one more aspect to optimizing your images your web pages. That is the resolution, often called DPI (for dots per inch). Computer monitors can only resolve 72 DPI. Many webmasters scan or create their images with higher DPI thinking their images will look better or to give them the resolution they need to make a good print. If you resize all of your web page's images to 72 DPI, you make your image file as small as it can be without affecting the image's appearance on the web. Again, your pages will load faster and your web hosting company saves on bandwidth.