'Java Script - How to load frames/images fast?

I've been trying for a while now to make my images play like its a video to get like 2+ fps. My system updates the jpeg file pretty quick i just need it to load quick, i can't get more than 1 frame per second which is pretty slow, even if i change the loop timeout to less than 1s it won't load or it will take more than 2seconds to load.

My current code :

<?php
 ?>

<!DOCTYPE html>
<html>
<body>

<style>
.disclaimer{

    display: none;

}
</style>

<p id="demo"></p>


<img id="dumb" name="dumb" src="dumb.jpg" alt="Image" style="width:960px;height:540px;">


<script language="JavaScript">


function randomIntFromInterval(min, max) { // min and max included 
  return Math.floor(Math.random() * (max - min + 1) + min)
}

window.setInterval(function() {
      var myImageElement = document.getElementById('dumb');
          var d = new Date();
    myImageElement.src = 'dumb.jpg?ver=' + d.getTime();;
}, 1000);
</script>
</body>
</html>


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source