adds an infinite loop for images