Blank image encoded as data-uri [duplicate]
This question already has an answer here: Smallest data URI image possible for a transparent image 9 answers I've built an image slider (based on the terrific bxSlider ) which will preload images just-in-time before they slide into view. It's working pretty well already, but I don't think my solution is valid HTML. My technique is as follows: I generate the slider markup with the first slide image being inserted as usual (with an <img src="foo.jpg"> ) and subsequent images being referenced in a data attribute like <img data-orig="bar.jpg"> . A Javascript then juggles the data-orig -> src