Lottie-web: can i export Svg animation files instead of js/json files?

Created on 12 Jul 2017  路  7Comments  路  Source: airbnb/lottie-web

I am using bodymovin to create web animations and am rendering them in bodymovin as .json files. Lately I found that .Json files are having big file sizes and are not preferred when we are having a lot of animations in our site as they will substantially increase the web page size.
I want to render my animations from after effects as pure svg animations which give me a simple .svg file.

Is there anyway to render after effects animations as svgs, or atleast can i convert a .jason/.js file into .svg file?

Thank you.

Most helpful comment

A couple of things:

  • #47 covers converting bodymovin to SVG filmstrips.
  • If it helps, I've also written a tool to help with this outside of the library. Upload a bodymovin json file to it and it'll render separate SVG files on the screen. Click any of them to get a text file of all the SVGs together. I'm not currently supporting it, but I'm happy to open source it if it helps!

All 7 comments

No, unfortunately there is no way to export an animated svg from After Effects, since svg doesn't have a full supported animation native language.
Exporting a sequence of stills embedded in a single svg would make the filesize even larger.
What's the filesize of the animations you're working with?

Im getting 1mb to 2mb json files for a 1366*130 size animations. and if i have to use 5 to 6 of such kind of animations, then the web page size will go upto 10 mb or so. so i would like to avoid it. Also devs are reporting that jsons are not good for website's health. So, im deperately looking for an alternative.

Have you tried usin jsons gzipped? Their size will be reduced considerably.
Can you share an .aep?
Regarding website's health, I'm not sure what they mean.

A couple of things:

  • #47 covers converting bodymovin to SVG filmstrips.
  • If it helps, I've also written a tool to help with this outside of the library. Upload a bodymovin json file to it and it'll render separate SVG files on the screen. Click any of them to get a text file of all the SVGs together. I'm not currently supporting it, but I'm happy to open source it if it helps!

Wow. Your tool sounds very promising. I thought of writing one as well. Any chance you will release the code of yours? May be we can join forces...

Thanks jkosoy! Would love to see your opensource.. please do comment here if you do it. Thanks.

This tool can render SVGs from lottie files (via plugin):
https://www.keyshapeapp.com/

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ochanje210 picture ochanje210  路  3Comments

ritsraghani picture ritsraghani  路  3Comments

phileastv picture phileastv  路  3Comments

Ipaulsen picture Ipaulsen  路  4Comments

jumostudio picture jumostudio  路  3Comments