JSFiddle - React, Tailwind, and code Playground
CSS
img { width:20%; height:20%; border:2px solid #000; }
JavaScript
function load (source) {
var img = new Image();
img.src = source;
console.log('Loading ' + source);
var interval = setInterval(function () {
if (img.complete) {
clearInterval(interval);
complete(img);
}
}, 400);
};
function complete(img) {
console.log('Loaded', img.src);
document.body.appendChild(img);
};
var sources = [
'http://motivationbeat.com/wp-content/uploads/2013/02/butterfly2_large1.jpg', 'http://www.spektyr.com/PrintImages/Cerulean%20Cross%203%20Large.jpg',
'http://www.mibz.com/wp-content/uploads/2009/10/tesla-model-s-large-3.jpg',
'http://chamorrobible.org/images/photos/gpw-20040823-UnitedStates-DefenseVisualInformationCenter-DF-ST-99-05286-The-Great-Sphinx-of-Giza-and-one-of-the-Great-Pyramids-Egypt-large.jpg','http://wwwstaff.ari.uni-heidelberg.de/gaia/gallery/GR/gr0283-01.artistic-Gaia-Galaxy-large.jpg'
];
for (var i = 0, n = sources.length; i < n; i++) {
load(sources[i]);
}