Skip to main content

A tool to inline images in Lottie JSON files

Project description

Lottie Inline Tool

A simple tool to inline images in Lottie JSON files.

Installation

$ pip install lottie-inline

Usage

Basic usage:

$ lottie-inline /path/to/input-lottie-file.json /path/to/output-lottie-file.json

Limit the size of the images to be inlined to 100KB:

$ lottie-inline /path/to/input-lottie-file.json /path/to/output-lottie-file.json --max-size=100

Details

The tool will inline all images in the Lottie JSON file and save the result to the output file.

transform:

{
  "assets": [
    {
      "id": "image_0",
      "w": 500,
      "h": 500,
      "u": "images/",
      "p": "image.png",
      "e": 0
    },
  ],
}

to:

{
  "assets": [
    {
      "id": "image_0",
      "w": 500,
      "h": 500,
      "u": "",
      "p": "data:image/png;base64,...",
      "e": 1
    },
  ],
}

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

lottie_inline-0.1.3.tar.gz (2.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

lottie_inline-0.1.3-py3-none-any.whl (1.8 kB view details)

Uploaded Python 3

File details

Details for the file lottie_inline-0.1.3.tar.gz.

File metadata

  • Download URL: lottie_inline-0.1.3.tar.gz
  • Upload date:
  • Size: 2.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.15

File hashes

Hashes for lottie_inline-0.1.3.tar.gz
Algorithm Hash digest
SHA256 d9ef43a761471b2ea886ef1e481a29f8b5b072fe4339acadfe834fb7e5169b37
MD5 779d29a1d05fe0dda753b4dcbdbfd346
BLAKE2b-256 c82de6a10f6390584941e6e99e27a0a7b855c73a39d717861349aaaa3f0bc8af

See more details on using hashes here.

File details

Details for the file lottie_inline-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: lottie_inline-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 1.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.15

File hashes

Hashes for lottie_inline-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 9f27788b6bdcbd20357ea822b69d80124f644eee0de36d5c09d662e50faabfa6
MD5 0666850b7e75b4f23e48a1c3323bde75
BLAKE2b-256 b655e83c5a10c4b91440eb36697f69fb3f99f37fbbca86a847a4aac611a3e77f

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page