When to consider base64 (DATA: URI) images?

What are the factors that should trigger thinking about switching images over to Base64 embedded in CSS?

There seems to be a lot of generic pro/con type things out there. Wikipedia seems to have a decent overview: http://en.wikipedia.org/wiki/Data_URI_scheme#Advantages

From what I've read, the one factor that seems to make base64 an easy decision would be if your site has to access a lot of individual small images and having one large file would be more efficient that hitting the server 50 times for each individual image.

But...it also seems that with sprites and the fact that rarely would I need 50 separate images on a page, Base64 isn't offering a whole lot for general web sites.

Are there are key factors I should be looking for (both pro/con)?

(This may better as a community wiki entry rather than question)

UPDATE:

Perhaps a more succinct way to word the question:

Given these two options:

1) All images converted to base64 and embedded in the external css file

2) Images gathered into a handful of sprite images, referenced in the external css file

Are there obvious situations where one is better than the other, or is it really just a case-by-case, do both and test type of thing?

7
задан DA. 13 April 2011 в 15:46
поделиться