const imgArrs = [‘imageurl1‘, ‘imageurl2‘, ‘imageurl3‘] const loadImg = () => { if (!imgArrs.length) return; const img = new Image() img.src = imgArrs[0] img.onload = () => { setTimeout(() => { document.body.appendChild(this) imgArrs.shift() loadImg() }, 2000) } } loadImg()