JSFiddle - React, Tailwind, and code Playground

HTML

<img id="random-image" src="" alt="">

JavaScript

var img = document.getElementById('random-image');
var images = [
'http://lorempixel.com/100/100?1',
'http://lorempixel.com/100/100?2',
'http://lorempixel.com/100/100?3',
// alle weiteren Bilder hier angeben
];

function f () {
  img.src = images[Math.floor(Math.random()*images.length)];
  setTimeout(f, 5000);
}

f();