Create a vector with all frames required for the animation, then use image_morph and providing the number of frames
image_morph(c(img1,img2,.....), frames = 10)
# image_morph creates animation using images and running the images for required number of frames.
# Higher the frames more images better the animation.