Yes, it is possible to preserve the aspect ratio when scaling a Lottie image sequence in canvas mode in Webflow. In fact, the canvas component in Webflow provides a built-in option to maintain the aspect ratio of its content.
To achieve this, you can follow these steps:
1. Add the Lottie animation to your canvas component by dragging and dropping the Lottie file onto the canvas.
2. Position and size the canvas component as desired within your layout.
3. With the canvas component selected, you will see a set of options in the right-hand panel. Look for the "Size & Position" section and click on the "Preserve Aspect Ratio" checkbox.
4. By enabling this option, the canvas component will automatically preserve the aspect ratio of the Lottie image sequence when you scale or resize it. This means that the animation will retain its proportions and won't appear stretched or distorted.
Additionally, you can control how the canvas component behaves when it is resized. You have three options available:
- "Contain": This option will scale the animation to fit within the canvas while preserving its aspect ratio. If the canvas becomes smaller than the animation, there may be empty space around the animation.
- "Cover": This option will scale the animation to cover the entire canvas, potentially cropping parts of the animation if the canvas is smaller than the animation's aspect ratio.
- "Auto": This option will scale the animation to fit the canvas without preserving its aspect ratio. This may cause the animation to appear distorted if the canvas's aspect ratio doesn't match the animation's aspect ratio.
By selecting the appropriate option and enabling the "Preserve Aspect Ratio" checkbox, you can achieve a responsive and visually pleasing scaling of a Lottie image sequence in canvas mode in Webflow, similar to how it is achieved with SVG.