I fact we don't need the setTimeout in this implementation (In my first code I had to let some time to start the download of the image). I've removed it.