Ignite Velocity: Image Weight Loss Clinic
A few months ago I gave a 5 minute Ignite talk at the Velocity conference. (My previous post talks about the Ignite experience.) I thought they recorded the video and wanted to share but seems like it's not happening. So below are the slides from slideshare.
The ignite talk rules are: 20 slides that change automatically after 15 seconds. But I took the liberty of hacking the format a little bit. For one, the 18th (and 19th) slide which was my main point is duplicated. And then I had some transitions, like in the first two slides for example, where different text or pictures change after a timeout. I expanded those transitions for slideshare, so the slide count is 40-something, but at the presentation it was still total of 20 slides in 5 minutes.
If you follow the slides on slideshare, be sure to click the Notes tab which has what I said, more or less, at each slide. The full script is below.
And yes, if you like it, please vote for my South by Southwest panel proposal. It has the same name "Image Weight Loss Clinic" but will be a much longer version of this 5 minute Iginite and what is more - Derek Tonn of graphicsoptimization.com will share the stage with me. Pretty exciting, so cast you votes, leave a comment and help me get to SxSW.
The Script
Here's what I said, more or less:
- Let’s talk a little bit about cutting back on that bandwidth bill. Saving some money. And without touching the code. How do we do that? One way is…
- Images. Ever since the dawn of times people have been using images. Cavemen scraping on their cave walls… and today… Today we have websites. And LOLcats.
- Half of the average web page weight today is images. And most of these images are too fat. They could use a diet and lose some weight but without losing quality, not even a single pixel.
- So, welcome to the Image Weight Loss Clinic. Our first patient today is... some random page found on the Internets. Hmm, what have we got here… Header graphic, speaker photos, logos, rotating banners – the usual stuff.
- First problem - there are some GIFs. We shouldn’t be using GIFs. PNG is the format for graphics - buttons, icons, and so on. The palette type of PNG, also known as PNG8 is good as a GIF and actually better. And PNG filesizes are smaller. Well, except for really tiny GIFs, but let’s ignore these, they don’t matter much.
- You should convert all your GIFs to PNG8. There’s a number of tools to do this in a batch. You can use ImageMagick for example. “Instant results or your money back”. Especially since ImageMagick is free.
- For your JPEG photos, use JPEGTran. It’s free, cross-platform, command-line tool, easy to script. And it’s lossless, you keep the photo quality. If you run it without setting any options, that’s good enough. Run with the
–optimizeand you’ll get even better results. - Option
–progressivemakes JPEGs that render in the browser from low resolution to high, as opposed to top-to-bottom. If the JPEG is bigger than 10K (which is most JPEGs), the progressive encoding has a good shot at giving you a smaller image. You can always brute force – run with both options and take the smaller result. - Option
–copy nonestrips all comments and meta data - camera model, geo location, everything. If you own the image, strip the meta data. You’ll be surprised how much bloat is in there. If you don’t own the image, check with the owner. Option–copy allkeeps all meta data. - Next – PNG. There’s a lot of options to optimize PNGs - all lossless and scriptable on the command line. Some even have nice graphical UIs built on top of them, you know, for our command-line-challenged friends.
- There’s even browser-based UIs, built on top of some of the tools. For example, smush.it, which is now part of YSlow runs PNGcrush. Google’s Page Speed runs OptiPNG.
- With so many PNG tools, how do you decide which one to pick? They are all good tools and they do their best, so if you’re in a hurry, just pick one and go with it, script it. You’ll be pleasantly surprised by the outcome.
- Now if you’re serious about PNG weight loss, you can run all the tools you can lay your hands on. Run the next tool on the result of the previous, try with their different options switches. They all do different things, and results may vary from one image to the next. Run them all in sequence and get an even smaller file at the end.
- Or, if you’re hardcore – run PNGSlim. PNGSlim is actually a Windows batch file that runs most of the other tools. It’s very slow, it can take hours to go through a handful of files. But at the end, it will give you the leanest, most optimized PiNG.
- Let’s see some results. That page has a total page weight of over 800K, including scripts, styles, everything. Over 80% of the weight is images. And what happens after optimization?
- We can strip quite a bit, over 200K of unnecessary image information. 200K, that’s over 30% if the image weight. The page looks exactly the same, pixel by pixel. There was no manual work involved, just running some tools. I think 30% is pretty impressive.
- To summarize, don’t use GIFs, run JPEGtran on your photos, and for the graphics - any PNG or all PNG tools.
- So the tools are available out there, now all you need is a process that runs the tools before your images go live. Make image optimization part of the push process.
- These are all lossless operations that don’t require you to look at the images to verify they’re OK. So you can only win! And often you’ll see some amazing and surprising results. Even if you normally do a good job with image sizes, there’s always a few that slip as you race against the deadline. The thing is – setup a process, so you don’t even need to think about it.
- Thanks very much, everybody! I’m Stoyan from Yahoo! Search. Enjoy Velocity, it's a great conference!
This entry was posted on Wednesday, September 2nd, 2009 and is filed under images, performance, speaking. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.
Get notification for future posts: follow me on Twitter or subscribe to my RSS feed

September 3rd, 2009 at 9:06 am
Too bad about the video not being put up – would’ve liked to see this version of the talk.
Here’s hoping this panel gets approved for SXSW. Definitely one of the talks near the top of my list for next years conference.
April 24th, 2010 at 1:58 pm
Yes, it is really important to retain the sizes of web pages as low as possible. Now Google takes this factor in ranking search results.
June 8th, 2010 at 11:58 am
Great article on lowering our bandwidth usage. I will definitely be using your advise on my web pages.
June 23rd, 2010 at 12:21 pm
great slideshow, I am going to try one of the png tools you recommend with my websites…thanks for the post
September 23rd, 2010 at 11:29 pm
Even though I’ve worked on the internet and with webpages for a couple of year I’d never heard of JPEGTran. Thanks for the great information and hope the conference went well.
November 27th, 2010 at 1:33 pm
I just located your site, I bookmarked it and i ‘m looking at the blogposts. I undoubtedly enjoy it. Helpful subject in any event you actually look on it. I come by way of this mindset that will view comments as akin of tuning in.
December 8th, 2010 at 4:26 am
fantastic script and tips. Ill implement this on my sites in order to greatly lower my bandwidth.
December 16th, 2010 at 3:36 am
Thank you for your article. But please consider an article about “fastest way to lose weight”. It’s an article that must be writen, so hopefully I’ll read something about it here in your blog.
January 10th, 2011 at 1:11 pm
Good article thanks
January 13th, 2011 at 12:19 pm
As a webmaster I am always looking for ways to do things better and to save my clients bandwidth, this is something that I need to see if I can implement. Thanks
January 14th, 2011 at 6:29 pm
Yeah, I have the same situation as Dan above here. As a person who deals with businesses and builds websites its good to always keep it fresh and improving. Thanks for the tips!
May 3rd, 2011 at 11:31 pm
Thanks for posting – Great article on lowering our bandwidth usage. I will definitely be using your advise on my site. Cheers, James.
November 9th, 2011 at 10:44 pm
Pretty nice post. I just stumbled upon your weblog and wished to mention that I’ve really loved browsing your blog posts. After all I will be subscribing to your feed and I hope you write again very soon!
May 3rd, 2012 at 2:23 am
Nice post. I was watching continuously this site and I’m impressed! Extremely useful info especially the last part I care for such info much. I was looking for this particular information for a long time. Thank you and best of luck.
July 13th, 2012 at 2:22 pm
I am unable to beleive just how much dedication you set in to this particular ! inventive could be the only way to begin with to explain this particular. Continue the truly great work !wonderslim shakes
March 27th, 2013 at 2:52 pm
Wow that was strange. I just wrote an really long comment but after
I clicked submit my comment didn’t appear. Grrrr… well I’m not writing all that over again.
Anyway, just wanted to say superb blog!
April 19th, 2013 at 3:45 pm
Really when someone doesn’t know after that its up to other people that they will help, so here it occurs.
April 25th, 2013 at 1:47 pm
Well worded. My thanks for posting this. I will come to this site to see what’s new and recommend my people about your website.
April 27th, 2013 at 11:18 pm
I’m truly enjoying the design and layout of your blog. It’s a very easy on the eyes which makes it
much more enjoyable for me to come here and visit more often.
Did you hire out a designer to create your theme? Outstanding work!
May 10th, 2013 at 3:25 am
Yes! Finally someone writes about doctor cohen diet.
May 21st, 2013 at 7:28 pm
Very soon this site will be famous among all blogging and site-building
visitors, due to it’s good posts