Made the animation trigger when the images have loaded