I wonder about how you manage and add your lottie files into your website pages. Rather than using GIF(which affects the page speed badly), we want to use lottie file. Without using any development support, I want to know that how you can utilize this in your HubSpot CMS.
Do we need to use the source code section to add that? Or do you have another trick?
The lottie example that I meant, you can see the first section of the homepage on this website : https://reposify.com/
Yes, I would definitely start by trying the HTML Module - go to the marketplace to install it if it's not already there (it's free, made by HubSpot directly). Then you can easily add a container to the page for your animation, e.g. like this:
<div id="lottie-container"></div>
Then you'll need to load and run the Lottie JS file; here is an example. To test this, you can just go to page settings and under Advanced Options, put this in the site Footer:
The best way to do this would actually be with a custom module that would basically just take the URL of the .JSON file, and expose some of those options (like loop, autoplay etc...) - and the module would handle loading the JS lottie dependency etc... but that would require a little more knowledge on creating modules.
This should let you quickly add a Lottie JSON file to a page though.
Let me know if that helped!
Cheers,
Mike
---
Did I answer your question? If your question is answered, please mark it as a solution. If you need more help, hit that big orange 'Reply' button!
Hi, we are using Lottie File within HubSpot website too, but our problem is that the animation looks good until we put it on the website. From then on the image is not sharp anymore.
Yes, I would definitely start by trying the HTML Module - go to the marketplace to install it if it's not already there (it's free, made by HubSpot directly). Then you can easily add a container to the page for your animation, e.g. like this:
<div id="lottie-container"></div>
Then you'll need to load and run the Lottie JS file; here is an example. To test this, you can just go to page settings and under Advanced Options, put this in the site Footer:
The best way to do this would actually be with a custom module that would basically just take the URL of the .JSON file, and expose some of those options (like loop, autoplay etc...) - and the module would handle loading the JS lottie dependency etc... but that would require a little more knowledge on creating modules.
This should let you quickly add a Lottie JSON file to a page though.
Let me know if that helped!
Cheers,
Mike
---
Did I answer your question? If your question is answered, please mark it as a solution. If you need more help, hit that big orange 'Reply' button!
Hi, this looks like a good solution for me. However, I cannot find any HTML module - neither in the Hubspot marketplace, nore in the collection of our installed modules. Does this depend on the theme we're using? Any hints appreciated 🙂