We are in the final stages of launching a major website redesign and have encountered a major bug. We have built lightweight DotLottie animations for much of our site to illustrate a SaaS product - however, these files are crashing in Android Mobile browsers. We do not have this issue on iOS or on desktop on both Mac and PC.
We either have two options as I see it:
Input custom code to prevent these specific animations from loading in mobile views. I’m not talking about hiding this element from displaying on mobile. They still load and cause a crash in this configuration. I’m talking about preventing these JSONs from loading entirely on all mobile browsers.
Option two would be to prevent whatever is causing this crash. We have a high volume of these images, which has not posed a challenge for the web - but could be the source of the issue for mobile. I doubt that this is possible.
Any help that the Webflow community could offer would be amazing.
Other people will discover this post. And based on the fact there are a few other questions with no solution, we can give the community the answer that you may be looking for:
To eliminate Lottie animations on mobile, place this before the body tag:
Been a while, but I’ll comment none the less, since it works for me. Wrap the code in <script>[code]</script> tags, place it in the head of your page or website in settings. Change the .bodyclassname in the code to something like .no-lottie-mobile and add that class to your lottie object in Webflow