Yoast: Building Page.ly Part4: Scalable and Fast Managed WordPress Hosting | Page.ly Blog http://t.co/ba32Hemn
![]()
SmushIt for WordPress
There are plugins for WordPress that are just too good to be true sometimes. One of my all time favourite coders, Alex Dunae, has written a plugin called WP Smush.it. I was pointed at this plugin by my WestHost buddy, Nick Nelson, who found it while working on optimizing a site on Tehran News.
The plugin didn't work for him, and it only worked for partly for me, which turned out to be because of some new stuff in the WordPress 2.9 branch. I had an email back and forth with Alex, who then fixed and updated his plugin, isn't open source great?
Anyway, what this plugin does is run any image you upload through a service called Smush.it. It uses, and I'll quote the site directly, "image format specific non-lossy image optimization tools to squeeze the last bytes out of your images - without changing their look or visual quality".
Basically, it's "save for web" on Steroids. And when you have this plugin enabled, you don't even have to think about it anymore, as it's taken care of when you upload the image.
The plugin also adds another column to your Media Library, where you can Smush images you've uploaded before you've installed the plugin as well. It looks like this:

This will now become a default install plugin for me, as it offers a very easy optimization for your images. Because of how fluently it's been integrated with WordPress, this plugin will work great with the WordPress CDN plugin I'm working on.






by Yoosuf on 8 July, 2009 at 11:39
Its a nice little feature, i wanna try it out
by Menno on 8 July, 2009 at 11:40
Let me get this straight. This plugun makes BIG images suitable for the web? I don't really understand what's the difference between the already existing scaling and this smushing...
by Joost de Valk on 8 July, 2009 at 11:43
It doesn't. What it does is squeeze all the optimization it possibly can out of the image, by doing all sorts of optimizations on it, saving up to 50% on some of my images. For instance the cdn-bandwidth image in the screenshot, was reduced in size by 33.8%, without any loss to the quality of the image, just because the plugin took it through the smushit service.
by Rich Moore on 8 July, 2009 at 11:41
Remarkable. I was Googling for a WordPress plug-in just a few hours ago. Quick search on Twitter and here I am. Excellent.
by Joost de Valk on 8 July, 2009 at 11:43
Heh, life is good like that sometimes ;)
by Ramoonus on 8 July, 2009 at 11:59
This is one of the easiest ways to decrease my website`s loading time and decrease the webspace use.
Thanks for the tip!
by Ramoonus on 8 July, 2009 at 16:04
I seem to save 0-20% with an average around 10%
The only thing that lacks is a feature to Smush all images at once
by juzdongivaphuck on 8 July, 2009 at 12:12
since the plugin works for all the images you upload from the moment you install it, it would be great to have the chance to smush all the images already uploaded all at once, or, at least, all the images in displayed by WP in a page of the media section. btw, great plugin!
by Shuki Haiminis on 8 July, 2009 at 12:19
Another great find Joost....Thanks so much for sharing with us. I just installed the plugin and have been smushing my old files that are uploaded already. It is saving a few % here and there that I know when added up will make a big difference on the overall server load.
I know it isn't your plugin but a feature that would be great is to be able to smush uploaded files in a bulk action task or something like that. I don't have a ton of images yet as we just started but I can imagine that it would take a very long time to go through a large blog one by one.
Can't wait to see the integration with your CDN plugin.
by Les on 8 July, 2009 at 12:28
And Yoast does it again! Thanks for another superb plugin!
by Shuki Haiminis on 8 July, 2009 at 12:41
Another cool feature would be a stats system so you could see just how much you have reduced your media library by.
by Ronnie Sullivan on 8 July, 2009 at 12:57
Nice post ....Very helpful ...thanks
by shira on 8 July, 2009 at 13:04
My site is so image heavy it's ridiculous. This is HUGE for me. Thank you!!!
by Scott Clark on 8 July, 2009 at 13:50
Ideal for WP installs with multiple authors with minimal computer skills. I plan to test it on WPMU for a site with 241 blogs which is suffering from image bloat.
by Joost de Valk on 8 July, 2009 at 13:53
Let me know how that works out Scott! I'm going to use it on a pretty big WP MU install as well.
by Alex Dunae on 9 July, 2009 at 23:11
I'd be interested to hear any feedback on this, Scott. I've only done minimal testing on WP MU.
by Randall on 8 July, 2009 at 14:18
I used this for a while, but found it unreliable. I use the bookmarklet poster A LOT, and in the month or so I used this plugin, whenever it had an error communicating with the Smush.it website it simply aborted saving the post. That turned out to be REALLY annoying. Have you seen this?
I eventually just switched to "Image Optimizer" and "Scissors", which offer alot more functionality.
by Joost de Valk on 8 July, 2009 at 14:29
I've been using it for a couple of days now and using it quite heavily, because I was testing my CDN stuff, and it's been very reliable... Scissors is cool indeed btw, but can integrate perfectly with this :)
by Willem Kossen on 8 July, 2009 at 14:42
Hi, A few questions about this plugin:
1. does it (or can it) also smush images that are part of the themes
2. does it (or can it) also smush images that are port of other plugins?
3. what if the image isn't on my blog but linked externally? Any advantage to using smush it (i suppose not...)
thanks! and thanks for posting this one. I already knew about it, but hadn't tried, now I will...
by Joost de Valk on 8 July, 2009 at 14:45
1: no, but you can use the smush.it service to do that.
2: no, same as above. All my Sociable images are smushed though.
3: no, but then it's not your bandwidth either.
by Zendevi on 8 July, 2009 at 16:35
Thanks for the great find - installed and testing and working like a charm!
by Mia on 8 July, 2009 at 17:53
Hi! Does this work using Windows Live Writer (or other desktop blogging app)?
:)
by Joost de Valk on 8 July, 2009 at 20:47
Yes it works with any desktop app. I use MarsEdit & Blogo myself and it works fabulously in those.
by oneighturbo on 9 July, 2009 at 04:41
Awesome. This was my first first thought!
by Nick Nelson on 8 July, 2009 at 18:54
For those with shell access, there's also a rails application that lets you do it command line - http://github.com/grosser/smusher/tree/master
Can't do a how to right now but it works quite well. :)
by Pallab on 8 July, 2009 at 19:11
I manually do the same using IrfanView.
by Joost de Valk on 8 July, 2009 at 20:48
Does IrfanView have Smush integrated?
by Nicholas Z. Cardot on 8 July, 2009 at 21:05
I just added this. It seems awesome. It even has the option to smush images that I've already uploaded in the past. I'm going through my media library right now. Awesome!
by archshrk on 8 July, 2009 at 21:24
I don't access my media library outside of a specific post so it took me aminute to realize the smush.it feature was here...
http://DOMAIN/wp-admin/upload.php
by Coree Silvera on 9 July, 2009 at 08:54
You have always got the coolest finds!! For someone like me that is not that technically savvy I especially love great WP plug ins! So, the reason I would use this is to make the files smaller without losing any quality, right? And why do I want to do that...to make my page load faster? See, I told you I'm not techy!
Thanks for sharing...can't wait for the next one.
by archshrk on 9 July, 2009 at 16:01
Found this on the plugin home page...
Which probably explains why it didn't work for me.
by Bluto on 12 July, 2009 at 01:39
fopen errors won't be the only problem. Anyone running there site on a server using the latest mod_security are going to have issues. mod-security v2.+ won't allow any get calls to external url's.
I haven't looked at the code though, so maybe he's worked around it. You can fix the fopen issue by inserting your own php.ini in the root of your site. Set it to open in your file, it MIGHT override the server php.ini
by Luci on 9 July, 2009 at 17:24
wow that sounds like a really handy tool! does it really keep image quality too?
by Karl Foxley on 9 July, 2009 at 22:00
I'v just uploaded this plugin and will be testing it over the next few days to see if it is a keeper or not! So far so good...
Thanks for giving the heads up on this one.
Regards,
Karl
by Davis on 11 July, 2009 at 04:20
Does it change the actual file that is uploaded? If I go back through my images, will the file size on the server change?
by Alex Dunae on 14 July, 2009 at 23:11
Hi Davis,
Yes, it does change the actual file. You'll see that the timestamp and the filesize will have changed. It does the same for the resized versions (e.g. thumbnails).
by Tim on 11 July, 2009 at 05:46
If this takes off they will have a considerable library of image links. I wonder if it will be searchable one day?
by Alex Dunae on 14 July, 2009 at 23:12
According to their FAQ, Yahoo does not keep your images, just stats.
by Jason on 12 July, 2009 at 07:08
beautiful, beautiful, beautiful. Nice find.
Thanks!
Pingback: EronInJapan » Automatic Lossless Image Shrinking
Pingback: Daily Tweet Roundup for 2009-07-14 | Z3bb Blog
by Chris on 17 July, 2009 at 17:04
Brilliant find. This is just what I've been looking for as it is hard to stop writers uploading big images. This is a great and simple way to ensure writers aren't uploading those resource hungry pictures.
by JUICEDaniel on 22 July, 2009 at 11:09
I tried to use it but it only says “Error posting to Smush.it” - with the old and new added pictures. Anyone knows about this error?
by Chris on 29 July, 2009 at 19:41
Something is wrong at Smush.it's end by the looks of it:
http://wordpress.org/support/topic/294352
by Benet on 8 August, 2009 at 22:16
Just installed this on one of my WordPress installs, and oh my goodness... the savings are amazing. Biggest smush so far was 55% off a single image. Nice! Thanks! =D
by Babak on 7 October, 2009 at 08:00
punypng, the new upstart seems to have much better compression.
check out the comparison:
http://www.gracepointafterfive.com/punypng-benchmarks
by Joost de Valk on 8 October, 2009 at 13:25
they do, but there's not such a nicely integrated plugin (yet)
by Tommix on 20 October, 2009 at 19:30
Need to make all images writeable, to smush it..and by default images are not writeable so...
by Joost de Valk on 21 October, 2009 at 14:17
Ehm, the files were uploaded through the web interface, hence the web server can write (to) them, hence it can also smush them...
by dimaks on 24 October, 2009 at 11:16
ahh.. now this looks amazing! speed is power they say and Smush.it is the tool. i will be installing this soon.
Pingback: The Benefits of Giving Away Code | Alex Dunae