If you're using sprites >32kb it appears this module begins to lose its effectiveness

Ex, from my CSS file using sprites, two background images use the same lengthy embed code :

data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAARIAAAA5CAYAAAD6K6RiAAAAGXRF
data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAARIAAAA5CAYAAAD6K6RiAAAAGXRF

Perhaps there needs to be attention payed to background items used in more than one instance?

Luckily my primary sprites are greater than 32 KB but this works great for smaller images that cannot be used through a sprite.

Comments

jcarnett’s picture

Status: Active » Closed (works as designed)

You're absolutely right. Embedding sprites with data URIs is likely to cause a lot of redundant data, but the two really shouldn't be used together. Sprites and Data URIs are both solutions with the same goal -- reducing request overhead. They're not particularly compatible because sprites require that you reference the same image multiple times in your CSS, and it's not possible to combine every occurrence when using data URIs so you get the same image embedded repeatedly.