Streaming live at 10am (PST)

Lottie Animations Full screen

Hi, I am trying to use the new lottie animation embeds but need to make them full screen and responsive like this example:

I can’t work out how to make it like this, I think I need to change the preserveAspectRatio for it, but am unsure how to do it.

Site in question here:


In After Effects, when you call the Bodymovin Plugin for the json export, you can open Settings inside of the dialog, and turn preserveAspectRatio to OFF.

1 Like

I don’t know if it has been updated or I’m doing something wrong but I can’t see any settings to change the aspect ratio in Bodymovin?
I’ve tried all of the dropdowns…

I agree with you, I have the same problem and I can’t find such settings.

1 Like

You can change these setting from the svg renderer. You’ll have to use the good old script to control this.


Thanks! That’s what I thought I needed to change, but I don’t know what script to use?
Because if you use the built in Webflow Lottie thing, how do I then change the aspect ratio in script?

Like how do I identify that animation for it to change the aspect ratio?


I tried this, but it didn’t work:

function SVGRenderer(animationItem, config){
		this.renderConfig = {
        preserveAspectRatio: 'none',
        imagePreserveAspectRatio: 'none',

Cannot work out what should be doing.

Hi, try this script in the custom footer code, you’ll need to host the json file somewhere though.
Edit: Actually you can host it on Webflow now.

var loader = document.getElementsByClassName("lottie-1");
function loadBMAnimation(loader) {
 var animation = bodymovin.loadAnimation({
   container: loader,
   renderer: "svg",
   loop: true,
   autoplay: true,
   path: "url_path",
   rendererSettings: {
  	preserveAspectRatio: 'none'}

for (var i = 0; i < loader.length; i++) {

Let me know if you have success with it.

You also need to initiate lottie.js with the following code into the custom head code:

<script src=''></script>

Edit: Tested, it’s working!

Thanks @ ColibriMedia, but when you refer to the “good old script”, what do you mean?!? I am using After Effects and I am using the plugin “Bodymovin”. Are you saying a previous version of the plugin?

Hi @rafdesign,

Before Webflow implemented lottie.js such as it is now. You had to add the script in the custom code. But as there is no option for preserveAspectRatio yet, you need to use that script unless someone has a solution to force preserveAspectRatio on the Lottie component.

By the way, after testing, I was unsuccessful when the json is hosted on Webflow. I could only make it work when hosted on github. Weird.

Here is a tut for the old way of doing lottie.

That’s what I’m looking for. Someone must know!

Here is the project I’m working on if that helps:

I have got the answer - @sabanna helped in another Webflowers thread

Works a treat.

1 Like