lottie
    Complete Guide

    Optimize Lottie Animations

    A complete, actionable workflow for making Lottie animations lighter, faster, and production-ready — from design through delivery.

    Phase 1: Design-Level Optimization

    Minimize anchor points

    Every extra vertex adds bytes. Use Illustrator's Simplify Path before importing to AE.

    Avoid raster images

    Embedded PNGs/JPGs balloon file size. Use vector shapes and gradients instead.

    Limit layer count

    Each layer adds transform data. Merge decorative elements into single shape layers.

    Skip unsupported effects

    Gaussian blur, drop shadow, and 3D layers don't export cleanly. Use shape-based alternatives.

    Use shape repeaters

    Instead of duplicating layers 10x, use a single repeater modifier for patterns.

    Phase 2: Animation-Level Optimization

    Reduce keyframe density

    Remove unnecessary keyframes. Ease-based motion needs fewer keys than frame-by-frame.

    Trim dead frames

    Cut empty frames at start/end. Set work area precisely before export.

    Avoid expressions

    Baked expressions generate verbose keyframe arrays. Use manual keyframes where possible.

    Limit frame rate

    24fps is sufficient for most UI animations. Higher rates multiply data volume.

    Simplify easing curves

    Complex bezier handles create larger keyframe objects. Standard ease-in/out works well.

    Phase 3: Export-Level Optimization

    Use Bodymovin standalone mode

    Avoids external asset references that complicate deployment.

    Disable hidden layers export

    Uncheck 'Include hidden layers' to exclude invisible content.

    Set decimal precision

    Reduce coordinate precision from 6 digits to 2-3 in Bodymovin settings.

    Export only needed comps

    Don't export the entire project — select specific compositions.

    Validate post-export

    Preview in LottieFiles or lottie-web before shipping to production.

    Phase 4: Delivery Optimization

    Enable gzip/brotli compression

    JSON compresses extremely well — 80%+ reduction with brotli on your CDN.

    Lazy-load animations

    Only load Lottie files when they enter the viewport using Intersection Observer.

    Use dotLottie format

    .lottie files are zipped bundles that reduce transfer size by 50-80% over raw JSON.

    Cache aggressively

    Set long cache headers — Lottie files rarely change after deployment.

    Preload critical animations

    Use <link rel='preload'> for hero animations to avoid layout shift.

    Production-Ready Checklist

    • All layers are vector-based (no raster images)
    • Layer count is under 20 for simple animations
    • No unused or hidden layers in the composition
    • Frame rate is 24-30fps (not 60fps)
    • Animation duration is under 10 seconds
    • Keyframe count is minimized with proper easing
    • Path complexity is simplified (fewer anchor points)
    • Bodymovin export excludes hidden layers
    • JSON is minified (no whitespace/formatting)
    • Served with gzip or brotli compression
    • Playback validated on target devices
    • Total file size is under 100 KB

    Compress your file automatically

    Use our free Lottie compressor to strip unused data and minify your JSON instantly.

    Open Compressor