its probably better to separate the svg image and the animation and do animation in css, because this way one can adjust or use different animations on different images.
I've had a go at this here (here is a copy of the homepage). The main issue that I encountered is that it doesn't seem to be possible to use <img src="loading.svg"> type tags -- this would display the SVG, but ignore the CSS. The workaround seems to be to use <object> instead.
its probably better to separate the svg image and the animation and do animation in css, because this way one can adjust or use different animations on different images.