Adopting an OSS-orphan: Autoptimize

I’m taking over support for the venerable Autoptimize WordPress plugin. Although I started out using CSS-JS-booster first, I switched to Autoptimize for my JS & CSS aggregating and minimizing pleasure somewhere in 2012, not in the least because it was the only plugin to offer conversion of background-images to data-uri’s. I hadn’t noticed back then that Autoptimize was already pretty old and that the developer announced he didn’t use WordPress any more and that he had lost most motivation. Fast-forward to December, when, while working on a Twenty Twelve child theme, I noticed that Autoptimize messed Twenty Twelve up severely. So I dug in, found some problems and fixed some others while I was at it:

  • leave html5.js be; aggregating it breaks HTML5-support in older IE versions
  • make sure the IE-specific CSS-files are loaded after the normal aggregated CSS
  • ensure both JPG and JPEG files are taken into account for conversion of background-images to data-uri’s
  • correct a bug that resulted in aggregated files not having a hash in them (having one or more autoptimize_.php can break things)
  • stop autoptimizing for logged in users (which broke the WordPress 3.5 admin bar again)

Based on feedback on the WordPress support forums, others were still using Autoptimize as well, needing bug-fixes and support so I contacted Turl a couple of days ago and proposed that I join his one-man team. He agreed, so I’ll be taking over Autoptimize as of now. The first update (1.4.1) with the fixes listed above will be pushed to SVN soon. I’ll provide support on the forums as well and release new bugfix-versions if needed. New features or other major updates however, are not on the roadmap (yet). I wouldn’t want my own children, WP YouTube Lyte and WP Donottrack, to feel neglected, now would I?

16 thoughts on “Adopting an OSS-orphan: Autoptimize”

  1. hi frank. thanks for taking over of this great plugin. i just like to report a bug: after upgrading to 1.5, HTML optimization doesn’t work anymore on my site. 🙁

  2. update: it seems like autoptimize 1.5 is not working at all on WP 3.5. the settings page loads, but the optimization on pages doesn’t seem to work. checked my source code and the “autoptimize” folder is not even included. i’ve reverted back to 1.4.

    • cfr. comment I just posted; check your site with 1.5 while being logged out. I looked at your site’s HTML a couple of minutes ago and it indeed was optimized 🙂

  3. frank, thanks for that info. i’ll try once again. the 1.4 version is being loaded on my site now. also, i’d like to give you some info on the scripts that should not be moved, specifically those javascript from ad networks that i’m using on my other websites that i manually inserted on the Scripts.php’s “$dontmove” array. can you send me your email so I can forward it to you?

    • The only change in the “$dontmove” array in autoptimizeScripts.php is the addition of ‘html5.js’. If you have other scripts that should be left alone, you can safely (re-)add them to the array. I need be, you can mail me at futtta-at-gmail-dot-com.

  4. Nice, I had the same issues and I had to manually fix them too 🙂
    There’s still some by the way, like the (turn optimization off for logged in users) which doesn’t exist in V1.6.4 yet.

    • Auto-optimization was turned off for logged in users in the 1.5 releases to prevent the admin bar bug from happening, but I implemented another solution for that bug, so disabling AO for logged in users makes no sense any more.

  5. Is there any thought to adding a feature that would allow files to be added with HTTPS:// so that there is no security issues with mixed content? It’s not a big deal, but it would make the errors on certain pages drop significantly — especially since google is now offering search ranking benefits for pages that force https. Just wondering. I am really impressed with the plugin, but even more impressed with your awesome views toward charity. I donated to a humanitarian aid group in the United States.

    • Hiya Curt;
      If WordPress knows you’re on SSL (cfr. wp’s is_ssl() function), AO picks up on that and uses HTTPS for the autoptimized CSS/ JS as well. If WordPress does not know you’re on SSL (if e.g. you have a reverse proxy doing SSL termination), then you could use the CDN-setting in AO to point optimized CSS/ JS files to the HTTPS-domain.
      hope this helps,

      • Nice! I think it was a cloud flare issue. I think we are rocking and rolling now! Thanks for your overall helpfulness… you really are a top notch guy 🙂


Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.