$w.onReady(function () {
reRun();
});
function reRun () {
$w('#gif').src = "some gif";
$w('#gif').show();
setTimeout(() => {
$w('#gif').hide('FadeOut');
}, 2000);
reRun ();
}
Try This Method:
Write a function and call initially and Call Inside the Loop.
It Will Become Infinity Loop