- Do you plan to use this CSS sprite generator?
- What's the time frame within which we can expect something? I'm not trying to sound harsh here, I'm just wondering ;) :)
- Looking for a co-maintainer? (This is on my Drupal 7 battleplan.) I'd like to help when I can – although that may not be all that often anymore, I've got a lot of modules on my plate already!

Thanks for taking the initiative!

CommentFileSizeAuthor
#7 sprites.preview.jpg129.6 KBtjholowaychuk
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

tjholowaychuk’s picture

Understandable :P I hardly have time with my few modules but lately I have been obsessed with 'frontend' performance. I took a brief look at the CSS sprite generator you mentioned above and to be honest it did not work quite as I had hoped! but it will certainly still be a consideration.

I am toying with ideas regarding how to integrate this module average Drupal users and themers, if it simply accepts images and then spits out the sprites image along with background positions then I dont think it would even be very useful being integrated into Drupal at all so I would rather think of other possibilities.

Help would certainly be welcome! I am sure you are more experienced than myself.


I was thinking of possibly parsing through CSS files and all images with small file sizes or dimensions would be queued for sprite generation, after the image is generated the appropriate CSS adjustments to the box model would take place. Then possibly a hook into theme_image(); replacing any that fall under the criteria as CSS sprites.

Something along those lines :P I have yet to consider the repercussion and scenarios of these features

Wim Leers’s picture

My intention was only to use the internals from the CSS sprite generator I was referring to, the UI we can get rid of immediately. This is only one file: includes/css-sprite-gen.inc from https://launchpad.net/css-sprite-generator/0.1/0.1a1.

tjholowaychuk’s picture

Certainly, I did not mean the UI, I will take a crack at my ideas and commit some code asap

Wim Leers’s picture

Oh, ok! Looking forward to your ideas and code :)

tjholowaychuk’s picture

After reviewing the code in written by "http://spritegen.website-performance.org/" I have decided just to roll my own Drupal specific sprite generation code, out of their entire class there was very little that would have been of use, and the portion that was useful is still not quite what I had envisioned. I will keep every posted on the project :)

Wim Leers’s picture

Pity :(

Btw, I've updated my blog post to include a reference to this project.

tjholowaychuk’s picture

FileSize
129.6 KB

Little preview of my progress 3 hours in.

Still many features / issues to deal with such as excluding images that are already acting as sprites in Drupal core, animated gifs, etc.

tjholowaychuk’s picture

Version: » 5.x-1.x-dev
Status: Active » Closed (fixed)