Hi,

1st of all thanks a lot for this module.

I think will be a great addiction to this module the possibility to create css sprites.

In a menu with 5+ items this will speed up the site loading a lot since need much less http requests (right now done for each image).

My idea is (and please not I dont know how to program) use image cache to generate a sprite and then aplly that to the generated css.

Ps: for people who dont know what is a sprite there is a explanation: http://css-tricks.com/css-sprites

Comments

AndyF’s picture

Version: 6.x-2.4 » 7.x-3.x-dev

I'd also be interested in this. I think service links has a module for generating sprites which could serve as inspiration.

acrollet’s picture

Status: Active » Closed (won't fix)

The CSS Embedded Images can fulfill the goal of this request. IMO it doesn't make sense to add lots of separately maintained code to meet the sprite generation use-case, but I would consider doing this with the sprite module if a well-supported d7 release came out. For now this is a wontfix.

AndyF’s picture

Understood, thanks for clarifying.

ridgek’s picture

acrollet, the CSS Embedded Images module is indeed a great module, but at least at first glance, it unfortunately seems it only parses theme CSS files. Upon enabling it on my test site, any CSS background images in my theme stylesheets are replaced by data:, but menu_icon's stylesheets remain untouched. I suppose this should be a feature request for the CSS Embedded Images module. :)

ridgek’s picture

Just submitted a feature request to CSS Embedded Images module for this. http://drupal.org/node/1601026

OnkelTem’s picture

Issue summary: View changes

I just want to announce a related module which I've just uploaded. It's called Sprites.

It generates sprites from images of a specific image style, replaces affected IMG tags with SPAN with identification CSS classes and generates required CSS definitions for applying background to SPANS.

Sandbox link: https://drupal.org/sandbox/onkeltem/2191795
Please check out and review.
Thanks.

P.S. Honestly, the idea of the module had come to my mind after I played with menu_icons module for some days. The problem with menu_icons module is that it doesn't support different states of menu icon images — like :hover, :focus, .active and etc. So I had to tweak menu_icons module by adding a couple of hooks which I used to plug SASS/Compass generation mechanism and I succeeded, while the solution was not universal. So I wished to create a more powerful solution and here you are: Sprites module, which works with any managed images processed through image styles (imagecache).