Multiple links same base64 img
Is it possible to reuse some image that is embedded in the code as base64? In my particular case, I have a list of div
's, each of which has as the first element a img
, given by base 64. There are three or four images, but so far I've made the image load as 10 or 20 times (which seems counterintuitive)
I tried 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.
This requires the image to be base64, not .png or .jpeg.
If there is another elegant way to do it, I'd love to try it too.
+3
source to share
No one has answered this question yet
Check out similar questions: