Sergey DesignerGet a quote ↗
Home / Animation guides

PRACTICAL ANIMATION GUIDE / 2026

Lottie performance best practices

Use static posters for collections, load players only when needed, pause offscreen and background playback, and test the actual artwork on representative devices. Track transfer size and rendering work separately. A small JSON file can still be expensive to draw, while a large collection can be fast if only the active animation runs.

Measure the complete experience

Begin with the page or screen a user actually visits. Include the surrounding layout, fonts, images and other scripts. An isolated player benchmark cannot explain how several animations interact with a product’s normal work. Record a cold load, scrolling, a common interaction and what happens when the animated section leaves the viewport.

Use laboratory measurements to diagnose problems and real-user data, when available, to understand the deployed experience. Keep the environment and test conditions with the report. A high score on localhost is useful evidence about that build, but it is not a guarantee about every device, network or hosting setup.

Use posters for an animation library

A gallery does not need to instantiate every player to show what the work looks like. Render a representative still from each real animation and use it as a lightweight preview. Load the interactive asset when a visitor chooses or deliberately explores it. This preserves a useful visual collection without making the browser render every item at once.

Keep the poster honest: it should come from the actual animation, not a stock image that suggests different work. Reserve its dimensions, lazy-load offscreen images and show the file details so a visitor can make an informed selection.

Bound loading and active instances

Several large JSON requests can arrive together and lead to expensive parsing and rendering work. Limit concurrency and avoid preloading a whole collection merely because it is listed in the document. A selected animation should take priority over speculative thumbnails that the user may never inspect.

Manage memory as well as bandwidth. When a preview is no longer useful, pause or destroy its player according to the experience you need. A small, bounded source cache can avoid repeated requests without retaining an unlimited set of parsed assets and live SVG trees.

Connect playback to visibility

Intersection Observer can help detect when an element enters or leaves a relevant viewport region. Use that signal to control loading and playback, with a threshold that matches the design. Also consider background tabs: a visible position in the document does not mean someone is currently looking at the page.

Keep user intent separate from automatic pausing. If a visitor manually pauses an animation, scrolling it back into view should not silently override that choice. Similarly, an expanded preview should not leave its original player running behind a dialog. Define these cases before wiring the controls.

Optimize the actual scene

Inspect the artwork when a single player remains expensive. Look for unnecessarily detailed paths, oversized embedded images, redundant elements and effects that do not contribute at the intended display size. Work with the animator to simplify without losing the important visual behavior. Not every export setting is a safe automatic optimization.

Compare the revised output against the approved reference, including loops and edge frames. A smaller file that changes the composition or introduces artifacts is not a successful optimization. Keep before-and-after measurements and test the target runtime rather than relying only on an editor preview.

Protect layout and interaction

Give animated regions a stable size before the asset loads. Avoid large layout changes when controls appear or a preview switches to a different aspect ratio. If an animation is below the first screen, it should not delay the content that introduces the product and gives the visitor a useful next action.

Respect reduced-motion preferences and provide a static fallback for nonessential movement. Check keyboard access to player controls, meaningful labels and legible contrast. Performance and accessibility are related design concerns: both improve when the visitor can understand the screen without fighting unnecessary work or movement.

Diagnose the bottleneck before changing artwork

Begin with a cold-load trace of the actual page. Separate network delay, script loading, player initialization and sustained rendering. If the first visual is late, a poster and better loading order may help. If scrolling is slow after every file has arrived, reducing transfer bytes alone will not address the main problem. You need to inspect active rendering work and the surrounding application.

Count active instances while scrolling through the page. A gallery may contain many references but only a few visible players. Use posters for the rest and release instances when they are no longer needed. Pausing a timeline and removing an instance have different memory and lifecycle consequences, so choose deliberately and test returning to an earlier section.

Inspect the artwork when one animation remains expensive in isolation. Dense paths, large masks, many layers or embedded raster content can change the workload. Simplify the scene with the designer, then compare the approved visual result and the performance trace. Avoid removing meaningful details without checking how the animation communicates at the actual display size.

Create an acceptance record for the representative device and page. Note the player version, viewport, network conditions, number of simultaneous instances and whether the cache was warm. Repeat the same scenario after a change. A single Lighthouse score is useful evidence about one run, but it does not replace checking interaction responsiveness or observing sustained animation on the product’s target devices.

A format decision table

Compare the actual scene and target runtime before choosing.
FormatUseful forQuality / controlWeight & support
Lottie JSONVector icons, UI and illustrationScalable supported vectors; player controlsVaries with paths and images; compatible runtime required
GIFAnimated image placementsRaster, limited palette; limited playback controlsCan grow with frames; broad image support
MP4CGI, footage, narrated explainersRendered pixels; video controlsDepends on codec and quality; test target playback
RiveState-driven interactive visualsDesigned interaction inputs and statesAsset plus runtime; test relevant integration

A practical handoff checklist

Before approving delivery, open the animation inside the intended screen with real content. Compare it with the agreed reference and check the start, loop boundary and final state. Confirm that the animation does not cover a control, obscure a label or leave the user waiting for decoration to finish. Review it at the smallest supported layout as well as the desktop presentation.

Ask for the agreed delivery files, a reference preview, the tested player and version, and a note describing triggers and fallback behavior. Confirm source-file and usage-rights arrangements in the project scope. A developer should not need to guess whether an animation loops, which frame is the resting state, or whether an embedded image is intentionally part of the file.

Test slow loading, an unavailable asset, reduced motion and navigation away from the screen. Keep essential instructions and status in accessible HTML. If a sequence is purely decorative, its failure should not block the task. If it helps explain a process, provide an equivalent explanation that remains available without playback.

Finally, assign an owner for future changes. Product copy, design systems and runtime dependencies evolve. Keep the approved source and integration notes together so a later update can be checked against the original intent. This small amount of documentation makes a custom animation easier to maintain beyond the launch.

Frequently asked questions

Does gzip solve Lottie performance problems?

It can reduce transferred text bytes, but it does not remove parsing or rendering work. If the browser becomes slow while animations are playing, inspect scene complexity and active instance count as well as network size.

Should offscreen players be paused or destroyed?

It depends on the reuse pattern and memory cost. Pausing can make a nearby preview quick to resume; destroying can release an instance that is no longer needed. Keep the policy bounded and preserve the user’s manual playback choice.

How do I request a custom animation?

Send the product URL, intended screen, target platform, brand assets, references and deadline. You can select a real example in the Lottie studio or use the estimator. The brief is reviewed before a final scope, price and delivery schedule are agreed.

Can I use a portfolio animation in my product?

A public portfolio preview does not grant a reuse licence for commissioned artwork. Request a custom version for your product and confirm usage rights in the engagement. Reference links are useful for discussing style, timing and behavior without assuming ownership of existing client work.

What should happen for reduced-motion users?

Provide an intentional still or simplified experience while retaining the same information and usable controls. Essential status should remain understandable without a loop. Test the target browser or app preference, and offer deliberate playback where it is useful instead of forcing continuous motion.

Can you prepare files for my development team?

Delivery can be scoped for Web, iOS or Android and the agreed runtime. Share the player, platform and integration constraints early. Compatibility is tested against that specific setup; a browser preview alone cannot establish support for every native player or every exported feature.

Sources and further reading

Technical references for the format and integration details in this guide. Check the documentation for the version used in your project.

Intersection Observer, MDN ↗Web Vitals ↗Lottie web player controls ↗

YOUR NEXT PROJECT STARTS HERE

Tell me what
you’re building.

A few details are enough to start. I’ll review your goals and come back with a scope, timeline and quote.

Serhii Dovhyi, motion designer
Hi, I’m Serhii.

I’ll be your direct creative partner, from the first idea to the final handoff.

Watch my current introduction ↗Personal welcome video · coming soon

“Sergey overprovided in no time! Super communicative and understanding.”

Chen Saban · Match Media · Client project feedback on Upwork ↗

Scope, payment, revisions and source-file rights are agreed in writing before work starts. NDA available to discuss. Coming from Upwork? You can keep the engagement there.

Your details are used to reply to this enquiry. Privacy policy.

No commitment. Just a clear next step.

Project preview

Original project by Sergey Designer. Open original