dimanche 19 avril 2015

multiple references same base64 img

Is it possible to reuse some image that is inserted in the code as base64? In my specific case, I have a list of div's, each of which has as the first element a img set by base 64. There are three or four images, but so far what I have done is loading the image like 10 or 20 times (what seems unlogical)


I was trying to do something like this:



.image1 {
src="data:img/png;base64,iVB(base64 here)..."
}

.image2 {
src="data:img/png;base64,aQp(base64 here)..."
}
.image3 {
src="data:img/png;base64,aPl8(base64 here)..."
}


and then add to each div a <img class='image1'> etc.


It requires that the image be base64, not some .png or .jpeg.


If there is another elegant way to do that I'd gladly try also.


Aucun commentaire:

Enregistrer un commentaire