How to create my own plot type as the background for animation

I would like to use plotly in R to create an animation. I followed the tutorial and knew how to create an animation: I would like to use the attached image as the background. The attached image is created by the library(kohonen) to create a self-organizing map. Is there a way I can do this? Thanks.