# Auto Sprite 1.0

**URL:** <https://www.ruby-forum.com/t/auto-sprite-1-0/181372>\
**Category:** Rails\
**Created:** [January 11, 2010, 5:01am UTC](https://www.ruby-forum.com/t/auto-sprite-1-0/181372 "2010-01-11T05:01:07Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![stephen](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/96bed5/32.png) [@stephen](https://www.ruby-forum.com/u/stephen)\
**Post date:** [January 11, 2010, 5:01am UTC](https://www.ruby-forum.com/t/auto-sprite-1-0/181372/1 "2010-01-11T05:01:07Z")

</div>

Hi all,

Just want to announce my auto\_sprite gem which some of you may find  
handy…  
It makes using CSS sprites painless. As a bonus - should you remove it  
some  
day, it doesn’t break you app, it just reverts to ![]() tags…

Full docs are at [http://fargle.org/auto\_sprite](http://fargle.org/auto_sprite)

In a pinch:

1. Include the stylesheet in your layout:

2. Create a directory called sprites in your images directory (e.g.  
RAILS\_ROOT/public/images/sprites)

3. Put the images you want to link to in your public/images/sprites  
directory.

4. Use your images like you normally would:

\<%= image\_tag â€˜sprites/logo.pngâ€™ %\>  
\<%= image\_tag â€˜sprites/icon1.jpgâ€™ %\>  
5. Reload you application and enjoy your now faster website.

Enjoy!  
Stephen

---

<div class="post-metadata">

**Author:** ![stephen](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/96bed5/32.png) [@stephen](https://www.ruby-forum.com/u/stephen)\
**Post date:** [January 13, 2010, 11:26pm UTC](https://www.ruby-forum.com/t/auto-sprite-1-0/181372/2 "2010-01-13T23:26:43Z")

</div>

Just curious - did anyone try this out with success/failure? Thx.

---

<div class="post-metadata">

**Author:** ![stephen](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/96bed5/32.png) [@stephen](https://www.ruby-forum.com/u/stephen)\
**Post date:** [January 13, 2010, 11:33pm UTC](https://www.ruby-forum.com/t/auto-sprite-1-0/181372/3 "2010-01-13T23:33:46Z")

</div>

Stephen wrote:

> Just curious - did anyone try this out with success/failure? Thx.

Not yet, but I’ll have to try. This looks very interesting!

## Best,

Marnen Laibow-Koser  
[http://www.marnen.org](http://www.marnen.org)  
removed\_email\_address@domain.invalid

---

<div class="post-metadata">

**Author:** ![stephen](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/96bed5/32.png) [@stephen](https://www.ruby-forum.com/u/stephen)\
**Post date:** [January 16, 2010, 6:32pm UTC](https://www.ruby-forum.com/t/auto-sprite-1-0/181372/4 "2010-01-16T18:32:09Z")

</div>

I do use this in a live project - its not just a “hey wouldn’t this be  
cool  
moment” =)

Would love to hear feedback/suggestions if anyone has some to share…

On Wed, Jan 13, 2010 at 5:33 PM, Marnen Laibow-Koser
