Skip to main content
Lottie4 min readNovember 2026

Why is lottie-web so big, and how do I make it smaller?

Short answer

The full lottie-web build includes three renderers and support for After Effects expressions, so lottie.min.js is about 306 KB minified (version 5.13.0, before gzip). If your files do not use expressions, import the light build, lottie_light, which is about 168 KB and contains no eval call, which also removes the bundler warning. dotLottie players that use WebAssembly are another option.

Core Takeaway

  • lottie.min.js (5.13.0): about 306 KB minified, uncompressed
  • lottie_light.min.js: about 168 KB, SVG renderer only, no expressions
  • The "use of eval" warning comes from expression support
  • Import lottie-web/build/player/lottie_light to switch
  • Lazy-load animations that are not visible on first paint

Two of the most discussed lottie-web GitHub issues are its size and a bundler warning: "Use of eval in node_modules/lottie-web/build/player/lottie.js is strongly discouraged". Both come from the same design choice: the default build supports everything.

What is in the full build

The default lottie.min.js includes the SVG, canvas and HTML renderers and the code that evaluates After Effects expressions at runtime. Expressions need eval, which triggers warnings in Vite and other bundlers and can conflict with a strict Content Security Policy.

We measured the files published in lottie-web 5.13.0 on jsDelivr: lottie.min.js is about 306 KB, lottie_svg.min.js about 243 KB and lottie_light.min.js about 168 KB. These are minified sizes before gzip or Brotli, which cut the transfer size a lot.

Switch to the light build

import lottie from 'lottie-web/build/player/lottie_light';

The light build has only the SVG renderer and no expression support, and it contains no eval call. If your animations were exported without expressions, they play the same. Test each file after switching.

Other ways to cut weight

Lazy-load the player for animations below the fold. Use dotLottie files, which are compressed. Or try a player built on a WebAssembly renderer, such as dotlottie-web, and measure it in your own app. Measure with your real bundle rather than trusting any single number, including ours.

Frequently asked questions

Does lottie_light play all animations?

It plays animations that do not rely on expressions and that the SVG renderer supports. Test your files.

How do I get rid of the eval warning?

Use the light build, which does not include expression support and has no eval call.

Is lottie-web safe with a strict CSP?

The full build needs unsafe-eval for expressions. The light build avoids that.

How big is lottie-web gzipped?

It depends on your bundler and compression. Measure it in your build output rather than relying on a published number.

Related Guides & Examples

Measure before you choose

Compare runtimes in your own bundle. ExodeUI has packages for React, Vue, Svelte and more.

Read the docs
ExodeUI

EXODEUI DESKTOP

A little space for good ideas.

Choose your platform to get the official ExodeUI installer.

Looking for Intel Mac or other builds? Explore the web studio or check all download options.

Prefer the browser? Try for free in your browser →