airbnb / lottie-web

Render After Effects animations natively on Web, Android and iOS, and React Native. http://airbnb.io/lottie/
MIT License
30.64k stars 2.89k forks source link

Any chance we can reduce lottie file size? #2587

Open tiagogda opened 3 years ago

tiagogda commented 3 years ago

Hey guys.

I did an animation in AE and converted it with bodymovin. The json file with the images of the animated png sequece has like 300mb, which is a lot! I'm compressing all the png's, reducing sizes on AE and the keyframes, still, a long way to go.

I've checked this animation on Samsung https://www.samsung.com/uk/smartphones/galaxy-z-foldable/ and theirs has way less size and the animation seems way more complex than the one I did.

Any of you knows what can be done to reduce as much size as possible?

Thanks!

bodymovin commented 3 years ago

hi, if your animation is a png sequence, it mostly depends on the duration and size of each frame. I don't think you'll be able to do much more to reduce the size. I'm not sure samsung uses lottie for that animation. They probably use some other specialized tool for loading images on the fly.

Pajool commented 2 years ago

You can try "dotLottie" format, it reduces the size drastically.

PythonCircuit commented 1 year ago

Does the dotLottie format even work for this package? It seems to only be supported by one player which is a web component @dotlottie/player-component

Pajool commented 1 year ago

I have not exported png files to lottie but, if you have already done that and got a jason file, you can convert it to dotLottie and see if it works, here: https://dotlottie.io/resources/json-to-dotLottie/