Lottie file size optimization: where the bytes hide and how to reclaim them
Why Lottie exports are bigger than they need to be
Export tools optimize for correctness, not size. Bodymovin writes every coordinate with full floating-point precision — 128.48000000000002 where 128.48 renders identically. Every layer keeps its authoring name ("Shape Layer 47 copy 3"), every group its match name, and the file carries generator metadata no player reads. On a complex animation these overheads are thousands of occurrences; trimming them routinely removes a third of the file before touching anything visual.
Embedded images: the biggest lever
Animations converted from raster sources — like the output of our GIF to Lottie and MP4 to Lottie converters, or After Effects comps with image layers — embed their frames as base64 images. Those images usually dominate the file size. Re-encoding PNG frames as WebP at 80% quality halves them with no visible change, and downscaling a 1080px-wide embedded image that displays at 400px reclaims even more. The optimizer only keeps a recompressed image if it's actually smaller, so it can never make your file bigger.
What's safe to strip — and what isn't
Lottie players ignore nm (names), mn (match names), and meta during playback, so stripping them is free — unless your code manipulates the animation by layer name at runtime (dynamic text swaps, theme color replacement). In that case, uncheck "Strip layer names." Hidden layers (hd: true) never render and are pure dead weight from the authoring file — removing them is always safe. Numeric precision at 2 decimals is sub-pixel accurate; drop to 1 decimal only for large animations where a hundredth of a pixel truly cannot matter.
Page speed, app bundles, and when size matters most
A hero animation that loads with your landing page sits directly in the critical path — Core Web Vitals feel every extra 100KB. Mobile apps pay twice: bundle download size and memory at parse time. Optimizing before shipping is the single highest-leverage step, and it composes with delivery tricks like gzip (which your server applies on top). After optimizing, verify the result in the preview, then round-trip it through our Lottie to GIF or Lottie to MP4 converters if you also need shareable preview files. Everything runs client-side — no uploads, no accounts.