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:

smushit

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.

48 Responses to “SmushIt for WordPress”

  1. Its a nice little feature, i wanna try it out

  2. 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...

  3. Remarkable. I was Googling for a WordPress plug-in just a few hours ago. Quick search on Twitter and here I am. Excellent.

  4. This is one of the easiest ways to decrease my website`s loading time and decrease the webspace use.
    Thanks for the tip!

  5. 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!

  6. 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.

  7. And Yoast does it again! Thanks for another superb plugin!

  8. Another cool feature would be a stats system so you could see just how much you have reduced your media library by.

  9. Nice post ....Very helpful ...thanks

  10. My site is so image heavy it's ridiculous. This is HUGE for me. Thank you!!!

  11. 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.

  12. 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.

  13. 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...

  14. Thanks for the great find - installed and testing and working like a charm!

  15. Hi! Does this work using Windows Live Writer (or other desktop blogging app)?

    :)

  16. 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. :)

  17. I manually do the same using IrfanView.

  18. 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!

  19. 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

  20. 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.

  21. Found this on the plugin home page...

    fopen Errors

    WP Smush.it currently requires that your PHP setup allows accessing remote URLs using fopen. See the PHP documentation for information, or hang tight… we’ll be updating the plugin soon.

    Which probably explains why it didn't work for me.

    • 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

  22. wow that sounds like a really handy tool! does it really keep image quality too?

  23. 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

  24. Does it change the actual file that is uploaded? If I go back through my images, will the file size on the server change?

    • 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).

  25. If this takes off they will have a considerable library of image links. I wonder if it will be searchable one day?

  26. beautiful, beautiful, beautiful. Nice find.

    Thanks!

  27. 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.

  28. 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?

  29. 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

  30. punypng, the new upstart seems to have much better compression.
    check out the comparison:
    http://www.gracepointafterfive.com/punypng-benchmarks

  31. Need to make all images writeable, to smush it..and by default images are not writeable so...

  32. ahh.. now this looks amazing! speed is power they say and Smush.it is the tool. i will be installing this soon.

Comments closed, if you feel you have something to say:
drop me a line.

3 Trackbacks to “SmushIt for WordPress”

  1. EronInJapan » Automatic Lossless Image Shrinking - Sun, July 12th, 2009 at 12:31
  2. Daily Tweet Roundup for 2009-07-14 | Z3bb Blog - Tue, July 14th, 2009 at 02:20
  3. The Benefits of Giving Away Code | Alex Dunae - Thu, November 26th, 2009 at 23:28