Open naaish-adam opened 1 month ago
I passed in a Lottie JSON with encoded images but it was mutated and the data URI for the images in the assets array was replaced with relative URLs.
const dotLottie = new DotLottie(); dotLottie.addAnimation({ id: "default", data: animationData // This gets mutated });
Before:
"assets": [{ "id": "2dd5bfdae9efbf11e27d9d5046c3c14629b81d94", "e": 1, "w": 300, "h": 406, "p": "data:image/png;base64,iVBORw0KGgoAAAA...", "u": "" }]
After:
"assets": [{ "id": "gbpoBJVn-f", "e": 0, "w": 300, "h": 406, "p": "gbpoBJVn-f.png", "u": "/images/" }]
I passed in a Lottie JSON with encoded images but it was mutated and the data URI for the images in the assets array was replaced with relative URLs.
Before:
After: