How do you prefer to handle image spriting in your web projects?
- by Macy Abbey
It seems like these days it is pretty much mandatory for web applications to sprite images if they want many images on their site AND a fast load time. (Spriting is the process of combining all images referenced from a style sheet into one/few image(s) with each reference containing a different background position.)
I was wondering what method of implementing sprites you all prefer in your web applications, given that we are referring to non-dynamic images which are included/designed by the programming team and not images which are dynamically uploaded by a third party.
1. Add new images to an existing sprite by hand, create new css reference by hand.
2. Generate a sprite server-side from your css files which all reference single images set to be background images of an html element that is the same size of the image you are spriting once per build and update all css references programmatically.
3. Use a sprite generating program to generate a sprite image for you once per release and hand insert the new css class / image into your project.
4. Other methods?
I prefer two as it requires very little hand-coding and image editing.