JSFiddle - React, Tailwind, and code Playground

by huppen

HTML

<p>Reload Image with interval:</p>
<img id="image" src="http://lorempixel.com/320/320/city" />

JavaScript

setInterval(function() {
var src = $("#image").attr('src');
src = src.split("?", 1);
$("#image").attr("src", src + "?stamp=" + Math.floor(Math.random()*1000));
}, 2000);