• http://twitter.com/mariuszwozniak Mariusz Woźniak

    Great summary on graphic optimisation for web. Always worth to refresh memory and learn something new!

  • http://www.ericmwelch.com Eric W.

    thanks, great to have all this information in one article.

    I think I missed part one though, link back to part one would be nice.

    cheers

  • Nikos T.

    Great article!

    I think you got something wrong here: “PNG 24 – Limitations: No transparency support.”

    • Andy Killen

      I think you are suffering from the mis-labeling inside photoshop where it only offers PNG24 and then offers transparency

      This is in fact PNG32.

      Quote from Wikipedia
      “PNG supports palette-based images (with palettes of 24-bit RGB or 32-bit RGBA colors), grayscale images (with or without alpha channel), and RGB[A] images (with or without alpha channel). PNG was designed for transferring images on the Internet, not for professional-quality print graphics, and therefore does not support non-RGB color spaces such as CMYK.”

      you need 32bits thus PNG32 to get RGBA

      • Nikos T.

        ah.. You ‘re right :)
        Thanks a lot for the info!

  • Daniel

    Hi there,

    great article thanks. But on top you have a slight mistake in it on top: PNG24 does support transparencies and works like charm for this purpose. Of course you´ll need a png fix for the 6…

    • Andy Killen

      See my comment above to Nikos, PNG24 is only RGB, PNG32 is RGBA

  • Richard

    Great article that has taught me a thing or two, amazed at the difference in file size between Photoshop and Fireworks.

    One thing that I’ve been wondering about for some time – maybe somebody can answer, when using a text-indent to hide the text of a logo – does this affect the SEO, as I’m sure that google knock pages down for hidden text (usually white text on white background) – does this apply?

  • http://www.zipbox.co.uk Hannah Hurst

    A really useful and informative article for optimising images for the web. Thanks for sharing.

  • http://www.ChiefAlchemist.com Mark @ Alchemy United

    Hey! Thanks again Andy. Good stuff.

    As a matter of fact I’ve used Yahoo’s Smush.it and it’s worth the extra step. It squeezed out more than I expected. Plus it’s just being thorough, right?

    • Andy Killen

      Yeah smush.it is good stuff. I know it’s just being though but its a step often forgotten, specially by graphic artist who just want to get their images out, not necessarily in the most efficient manner. I think that often we are working to the clock and this extra bit of time is sometimes left to one side. However well worth the effort. Same goes for sprites, many people find it annoying as they constantly have to keep re-building the sprite set as they go along, or re-program the site at the end.

      regards
      Andy

  • http://www.groundedtraveler.com Andrew

    As an addition to your comparison table I get a 1×1 Transparent Gif from GIMP at 807 bytes.

    I have a question about the extra domain CDN. I guess it needs to be a separate domain not a subdomain because the browser would still use the same DNS lookup to get to both. It sees them as the same DNS so only uses two connections? What I don’t quite understand is if the other domain still pointed to the same server, won’t they both resolve to the same IP?

    I don’t know so much about the Crushing stuff. Does that also remove the Title information that you can add through the properties popup in windows? I was under the impression that this was used by search engines to help index images and thus not necessarily a bad thing to have. I’ll go erad more on crushing in a minute, just wanted your thoughts on it.

    I like the section on sprites I knew how it worked, but that is such a nice presentation of it all.

    • Andy

      Hey Andrew,

      Yep it’s definitely worth using a different domain name for your CDN as then it will not exchange cookie information. Most of the time this choice will be forced upon you by the CDN company.

      Crushing only effects the inside of the image file, not how you present in on screen. So any HTML markup such as a title is not effected.

      As for two domains pointing at the same server, DNS is great at that. For example

      domain1.com A 192.168.1.1
      domain2.com A 192.168.1.1

      which means that for both of these A records it will go to the same server. On that server you tell it to listen for both domain names (domain1 and domain2) and point the traffic at the same location,so that you can keep the same domain structure if you like, or point the 2nd domain at a sub-directory.

      for example wordpress uses /wp-content/uploads/ in the URL, where you could tell domain 1 to point at the root and domain 2 to point at /wp-content/uploads/ and then tell wordpress to change the attachment link URL filter to be at / on domain 2.

      hope that is clear enough for you?
      regards
      Andy

      • http://www.groundedtraveler.com Andrew

        Yeah your explanation is fine, what I don’t quite get is how a browser would store it internally. I would think having two separate entries that ended up resolving to the same IP the browser would see them as the same server and still only use 2 connections to them. In the end, if it works to have a 2nd domain pointed at the server cool.

        I get that crushing has no effect whatsoever on the HTML markup. I was just under the impression that search engines read the EXIF info of the image file directly to help with its indexing. This I will need to look into me it seems.

        Thanks for your reply.

      • http://www.groundedtraveler.com Andrew

        Yeah your explanation is fine, what I don’t quite get is how a browser would store it internally. I would think having two separate entries that ended up resolving to the same IP the browser would see them as the same server and still only use 2 connections to them. In the end, if it works to have a 2nd domain pointed at the server cool.

        I get that crushing has no effect whatsoever on the HTML markup. I was just under the impression that search engines read the EXIF info of the image file directly to help with its indexing. This I will need to look into me it seems.

        Thanks for your reply.

      • http://www.groundedtraveler.com Andrew

        Yeah your explanation is fine, what I don’t quite get is how a browser would store it internally. I would think having two separate entries that ended up resolving to the same IP the browser would see them as the same server and still only use 2 connections to them. In the end, if it works to have a 2nd domain pointed at the server cool.

        I get that crushing has no effect whatsoever on the HTML markup. I was just under the impression that search engines read the EXIF info of the image file directly to help with its indexing. This I will need to look into me it seems.

        Thanks for your reply.

      • http://www.groundedtraveler.com Andrew

        Yeah your explanation is fine, what I don’t quite get is how a browser would store it internally. I would think having two separate entries that ended up resolving to the same IP the browser would see them as the same server and still only use 2 connections to them. In the end, if it works to have a 2nd domain pointed at the server cool.

        I get that crushing has no effect whatsoever on the HTML markup. I was just under the impression that search engines read the EXIF info of the image file directly to help with its indexing. This I will need to look into me it seems.

        Thanks for your reply.

  • Christie

    Thanks for a great, very helpful article!! I’ve always made animated GIFs in Photoshop (previously ImageReady) and when I saw you said it’s not possible in Photoshop, I was shocked. I haven’t made an animated gif in many years so I was inclined to believe you, but out of curiosity I went to check it out. You definitely can still make animated gifs in Photoshop. Window > Animate. Works just like ImageReady used to!!

    • Andy Killen

      thanks christie, I’ll change that, I was sure it did not do it. next time I will look even further.
      regards
      Andy

    • Andy Killen

      thanks christie, I’ll change that, I was sure it did not do it. next time I will look even further.
      regards
      Andy

  • Dzineblog360

    this is quite useful information….but it is a lot of information….I wish i would apply some of it atleast

  • Dzineblog360

    this is quite useful information….but it is a lot of information….I wish i would apply some of it atleast

  • http://www.facebook.com/osearth Osearth Spins Beats

     good as always :]

  • Pingback: Website Speed Part 3 – Caching Wordpress

  • VadimG

    great job guys only one problem png32 is a very problematic format and even photoshop does not support it correctly and does not allow for all it’s features to be used on it
    that is why png24 should be used as a standart for when needing high quality with transparency

    correct me if I am wrong 

    • Andy

      never had any problems with PNG32, which is RGBA, PNG24 is RGB only..  

      Photoshop does support it (badly and mislabeling it) by offering PNG24 with transparency.  see the comment reply to Nikos lower down.

      remember Photoshop is the WORST image creation tool for the web.  do not use it for creating web ready images, only for design.  

  • http://www.andysnotebook.com andydavies

    On the GIF for IE6 recommendation…

    From memory PNG8 transparency works fine in IE6 so long as the PNG8 isn’t produced using Photoshop
    (of course you only get one level of transparency but that’s the same as a GIF)

    • Andy

      Andy, sadly no, IE6 had (notice I say had as it is dead now, I hope) no PNG transparencies.  There were a bunch of different fixes for it (PNGfix is the most popular), but what would happen if you did not implement them is that the transparent area would just be grey and not be see through at all. 

      • http://www.andysnotebook.com andydavies

        Not that it really matters but http://www.sitepoint.com/making-ie6-friendly-png8-images/

        In my performance talks I always recommend people only use GIFs for animated images and PNGs for everything else

        • Andy

          I would pretty much agree.  Gif had a more blocky style than PNG8 and also often suffers with bleed at the edges.  

          And yep still no real replacement for the animated gif.  Options to replace yes, with CSS/javascript based animations but always at such a higher cost in kb’s, flash has the well documented limitations.

          regards
          Andy