Add new comment

CSS sprite generator open sourced!

published on February 2, 2008

I already mentioned the CSS sprite generator in my article on Drupal’s page loading performance. More great news though: they open sourced it! See the blog posts by the authors, Stuart Colville and Ed Eliot.

It’s under the BSD license though, so it would never be accepted on Drupal’s code repository, which is a must. I contacted the authors, asking if they would be willing to dual-license it under the GPL.

The effects of such a module – if technically possible to generate CSS sprites completely autonomously – would be enormous. It would reduce the number of HTTP requests per page considerably: all CSS background images would be aggregated into a single image!
Even on “just” the Garland theme of a default Drupal 6 installation (this includes a logo and a small Drupal banner at the bottom), this would save 7 HTTP requests per page.

Big warning sign: I haven’t actually used the CSS sprite generator yet, so I have no idea yet if it could be done completely without user intervention. But at the least, it can be integrated into Drupal so that it could be much easier than it is now.

Update on February 6

Ed Eliot replied the same as greggles commented below, the license is not an issue: the BSD license allows you to relicense as GPL.

Other than that, more good news: a CSS Sprite Generator module has been announced by tjholowaychuk at Drupal.org – without actual code for now. According to him, there’ll be actually very little code we can reuse. That’s sad, but at least we have another implementation to compare against.