• Danico Blog

What's a Sprite?

sprite

 At the first meeting of JUGCN (Joomla User Group Chicago North), this question came up, "What's a Sprite?"  

A Sprite is not a clear, cool refreshing drink.  It is a large image that combines all images into one.  

Why would you want to do this?  When your looking at improving performance, this may be an option.

How do you use it? To show the "right" section with your image, you update the background-position CSS property.  Some templates/themes do this with their internal icons.

What does this look like?  You might see something like this:

.icon-edit {
   background-image: url("images/mythemeimages.png;
   background-position: -96px -72px;
}

where the sprite is the image at the top which is similar to the sprite used by Twitter Bootstrap.

Joomla 3.8.4 Release
Celebrating MLK Day