Image Optimization, and Re-Optimization

Posted April 18th, 2005 by Mike Cherim

The more I develop websites, the more I have been concerning myself with image optimization. Put it this way, I used to crank up my image export compression setting to 100% in all cases. Now, well now I don’t. This is what I do do in my attempts to now optimize my images:

  • I test with different export formats where allowable. GIFF, I find, is not always the smallest or the best to use. I depends. If the image is one which might be okay as a GIFF, I will try it. Yet if it’s an image which would ordinarily be exported as a JPEG, I may test it as a GIFF to see how I fair. I have found that JPEG images are often smaller than than a GIFF of inferior quality. It’s ironic.
  • I push things with my export settings trying as low as 60% and checking the results. Bear in mind all of this takes just minutes. Save as new size/format, look at it, adjust… rinse and repeat.
  • I will sometimes lighten or darken by adjusting the background color and then adding transparency to the image. Doing it this way affects the image itself in only one way (transparency) so it loses little in the area of richness if the background color chosen was a good one — experiment. On the flip side, lightening or darkening reduces color-count which is effective for reducing file size.
  • Reduce the size. Making the image physically smaller will in itself lend to file-size reduction. So instead of going with a 600px by 300px image, see what a 300px by 150px will do. If an image has to be large to show artistic attributes or fine details, try posting a thumbnail copy and linking it to the full-size original. Also keep in mind how large images may look in smaller resolution monitors. A 600px by 300px image for example would be awfully big in anything smaller than a 1024×768 resolution.
  • If you have jumped on the W3C’s push-for PNG bandwagon, you might want to jump off for a bit. First of all the scare is off, GIFF isn’t going bye-bye and, second, PNG isn’t that well supported by all browsers and results can be mixed. And third, the PNG file size, being loss-less, can run high.
  • If you do use PNG images, try re-optimization. Optimize the native image, then open the exported PNG and re-optimize it for further reduction (and it’s still loss-less). An example is below:

Here’s my example images for the re-optimization of pre-exported PNG files.

Optimized Once Exported PNG
This is an optimized 148 color 148 x60 PNG file - 7969 bytes.

Re-Optimized re-Exported PNG
This is an optimized 64 color 148 x60 PNG file - 2528 bytes.

I got the second image from re-optimizing the first. I’m happy with its quality and for a whopping savings of around 70%, well, I’ll take it. If this were a GIF or JPEG it would be half the final size the first time around so I can’t really justify using PNGs, for now, but this may help those that do.

6 Responses to: “Image Optimization, and Re-Optimization”

  1. Robert Wellock responds:
    Posted: May 4th, 2005 at 5:36 am

    Are talking about PNG-8 or PNG-24 with the GAWDS icons.

  2. Cameron Baumann responds:
    Posted: October 30th, 2005 at 4:47 pm

    Very nice! I’m putting you on my favourites.

  3. Benjamin Brown responds:
    Posted: October 30th, 2005 at 4:49 pm

    It’s the first time i ran through your site and I found it very informative and interesting. Nicely done!

  4. webecho responds:
    Posted: January 28th, 2006 at 3:00 pm

    Just thought you should know that the second image is missing on FF1.5 (or maybe altogether??)

Sorry. Comments are closed.

Note: This is the end of the usable page. The image(s) below are preloaded for performance only.