It depends on what exactly you need.
for example, whether or not need some animation etc…
anyway if all you need is switching the image, you actually don’t need a repeater at all (you only show 1 image at a time.
Set interval (use setInerval() not setTimeout() ) and replace the image.src in a loop.