4 ms·
Generate CSS Sprites On The Fly
- jswinghammer 17y agoI'm at "The Ajax Experience" and saw Steve demo this page. I already have 3-4 pages in my application that I think I can update to use what I got from this site. It's a very nice tool. The only issue is that sometimes the file size of the generated image is larger. I guess they're just using the default settings for pngcrush but I'm not sure how much tweaking the image would help some of my results but it might.
- bmelton 17y agoDepending, it might still be worthwhile to use the bigger image vs. the overhead of an extra request. At least until you can shrink it down further anyway.
- olefoo 17y agoUnless you're talking about very large image sizes ( >200k ) and very low bandwidth; latency is a bigger timesuck, even with pipelined requests. Not to say that you shouldn't minimize images, but that's less of a concern than minimizing the number of requests.
- billybob 17y agoWow. That's very cool.
- patio11 17y agoThanks, I had been putting that off for a long, long time, but that tool provided enough of an impetus to do it. Shaved 6 requests off my front page. Some day when I get a moment I'll do another one for all the buttons.
- fuzzythinker 17y agoThere's http://dabuttonfactory.com http://dabuttonfactory.com for that.
- DrewHintz 17y agohttp://spritegen.website-performance.org/ http://spritegen.website-performance.org/ is similar. It has you upload a zip of your images and I think it gives you a bit more control over the sprited image it creates.
- DrewHintz 17y agoSpriteMe seems to only sprites images that are already used in a background. It would be more useful it had the option of spriting all images on a page and then gave you the HTML/CSS code to display each sprite.