It's one of the true native ways: inline SVG and pure CSS animation. Try to click on the image to restart animation.
Website Author's note: I use this technique in my free WordPress plugin called Icons Factory. Using this plugin you can generate a lot of similar animations.
You can install that by using the WP dashboard. Go to Plugins > Add new > Type "icons factory" in the search field > Find target name in the plugins list > Press "Install Now" > Press "Activate" > Done!