You can simply load in the first frame of the animation as a static image on SSR, then replace with the animation
This can also be used for progressive enhancement, since if the user has requested reduced motion you can simply leave the first (or last) frame of the animation, or hide it altogether.