Having loading issues with Lottie on cloud


I have written a game that requires a little animation to play once. This happens perfectly on local, but not on streamlit cloud.

  1. Local:

  2. Cloud:

Sometimes, the cloud version takes a very long time to complete.

Any reason why? If not lottie, then any other alternative?

The repo is here

Thanks in advance


I apologize if my previous response didn’t fully meet your expectations. I’ll provide a more concise response:

Issue: Animation not working consistently in Streamlit Cloud.

Possible Solutions:

  1. Optimize Animation: Ensure the animation is optimized for web use to reduce loading times.
  2. Preload Animation: Use HTML and JavaScript to preload the animation for faster loading.
  3. Alternative to Lottie: Consider using other animation libraries or formats like CSS animations or GIFs.
  4. Check Resource Limits: Ensure your app’s resource usage is within Streamlit Cloud’s allowed limits.
  5. Network Issues: Verify that the animation file is hosted on a reliable server.
  6. Debugging: Check the browser console for error messages.

For more specific guidance, reach out to Streamlit support or their community forum.

I hope this helps!

Hi @Ridaone

The local lottie files were very small and had been cached, so I didn’t expect / anticipate any problems. But then, with the lottie loading issue on streamlit cloud, I used GIFs instead as you recommended, and now everything works fine, locally, as well as on the streamlit cloud.

Thanks for responding and helping.


You’re welcome