Installation
- Download the Embed External Assets Into Lottie script
- Unzip the downloaded zip file
- In Cavalry navigate to
Help > Show Scripts Folder - Open the Scripts folder
- Drag the contents of the zip into the Scripts folder
- In Cavalry navigate to
Scripts > Embed External Assets Into Lottie
Usage
- Enable or disable the
Center anchor pointsfeature - Click the
Select JSONbutton and select a Lottie JSON file - The old JSON will be saved with a
.bakextension and the new JSON will have all external assets embedded into the JSON file
Notes
Caution
Lottie JSON files generated in Cavalry 2.5.4 or older do not copy external assets to the /images folder correctly. Be sure to use Cavalry 2.6.0 or newer. If external assets are missing you'll receive an error message.
Warning
Lottie JSON files generated in Cavalry 2.6.0 or older append an additional index number when copying external assets to the /images folder (ex: FileName0.png, FileName1.png). This is not a problem as the assets array in the Lottie contains the updated file names. Keep this in mind when manually copying over external assets to Lottie exports generated in Cavalry 2.5.4 or older.
Note
Simply replacing the external asset paths with base64 embeds (similar to Bodymovin) works well, however images appear to be using a bottom-right anchor point. Adjusting anchor points using negative half width and negative half height values appear to fix this issue.