Skip to content
GPLWP Guides

How to add Lottie animations in Divi

Design & Layout Time About 20 minutes 7 steps Updated 4 Oct 2026

DESIGN & LAYOUT
The short answer

Divi 5 can add Lottie animations through its built-in Lottie module, including controls for triggers, looping, speed and direction. Older Divi versions need a Code module with an external player or a dedicated plugin, so check your Divi version first.

The route
  1. 01Check your Divi version
  2. 02Prepare a trusted animation file
  3. 03Add the native Lottie module
  4. 04Set playback and sizing
  5. 05Use the manual embed route
  6. 06Test the published page
  7. 07Choose the fast route

What you need

  • A WordPress site using Divi 5 or an older Divi version
  • A Lottie animation in JSON, SVG or dotLottie format
  • Divi Visual Builder access
  • A backup before enabling new file types or adding custom code

Check your Divi version

Open the Divi Visual Builder and add a module. If you can search for a Lottie module, you are using the native Divi 5 route. Divi 5 supports animated SVG and JSON files directly in that module.

If the module is missing, do not keep looking for a hidden setting. Use the manual embed route in this guide or install a Divi Lottie plugin.

Prepare a trusted animation file

Download the animation as JSON, SVG or dotLottie from a source you trust. LottieFiles can provide a direct asset link and embed code, and its current player supports both .lottie and standard JSON files.

WordPress normally blocks JSON and SVG uploads. If the Media Library rejects the file, enable the file type only after checking its source and backing up the site. Uploading untrusted JSON or SVG files creates an avoidable security risk.

Add the native Lottie module

Open the page in the Visual Builder, add a row, click the module button and search for Lottie. Add the module, then upload your JSON or SVG file in the animation setting. Divi displays the animation in the builder once the file is selected.

Place the module in its own column if you need predictable sizing. This makes it easier to align the animation with nearby text, buttons or images.

Set playback and sizing

Use the Content settings to choose the trigger, loop behaviour, speed, direction and play mode. A view or click trigger is usually safer than hover because phones and tablets do not provide a normal hover interaction. Use a one-time play mode for an entrance effect and looping only when repeated motion supports the page.

Open the Design settings to set width, spacing and alignment. Use Divi's responsive controls to reduce the animation on mobile, and consider disabling a decorative loop on small screens to reduce distraction and battery use.

Use the manual embed route

On older Divi versions, add a Code module where the animation should appear. In LottieFiles, use the implementation or embed option to obtain the current HTML, player element or iframe code, then paste that code into the module. The provider documents HTML embed code, direct asset links and iframe options.

This route is workable but has drawbacks: you must load and maintain the player separately, playback controls are not native Divi settings, and the animation may not render inside the builder preview even when it works on the front end. If the code appears as text, preview the published page and check whether your security or optimisation plugin has stripped the script.

Test the published page

Save the page and test it while logged out on desktop and mobile. Check the trigger, first-frame loading, animation size, page movement and whether the animation still works after caching is enabled.

If it is blank, confirm that the file URL is reachable, the file format is supported, the player script has loaded and the animation was not blocked by a content-security or optimisation setting. For a Divi 5 site, returning to the native module is usually simpler than debugging a custom embed.

Choose the fast route

For Divi 5, the native module is the quickest option and you may not need another plugin. For older Divi versions, Lottie Animated Images for Divi Builder is the faster practical route when you want a Divi-native interface without writing embed code. It is suited to motion-focused page design and provides animation settings such as speed, loop and trigger controls.

Install it by uploading the plugin through WordPress, activating it, and then looking for its Lottie module in the Divi Builder. Confirm that it supports your installed Divi version before using it on a production site.

The fast route

Let Lottie Animated Images for Divi Builder do it

A lightweight Divi-native way to add customizable Lottie animations without coding; choose it for motion-focused page design.

Get Lottie Animated Images for Divi Builder

Sources

  1. help.elegantthemes.com /en/articles/11982058-the-lottie-module-in-divi-5
  2. help.lottiefiles.com /hc/en-us/articles/8704650653593-handoff-embed
  3. elegantthemes.com /blog/divi-resources/how-to-add-lottie-animations-in-divi-5

Questions

Does Divi support Lottie animations without a plugin?
Yes, Divi 5 includes a native Lottie module that accepts animated SVG or JSON files and provides playback controls. Older Divi versions do not offer the same native workflow, so you need either a Code module with an external Lottie player or a dedicated Divi extension. Check the module list before installing anything.
Why will WordPress not let me upload a Lottie JSON file?
WordPress blocks some JSON and SVG uploads by default because they can contain unsafe content. Use a trusted animation, back up the site, then enable the required file type through a suitable upload-permission method or use a hosted asset link instead. Do not allow unrestricted uploads on a site with untrusted users.
Can I add a Lottie animation to older Divi versions?
Yes, but older Divi versions normally require a Code module containing an HTML player or iframe embed, or a third-party Divi module. The manual method depends on an external player and can be harder to style and troubleshoot. A dedicated plugin is usually the better choice when non-technical editors need to manage animations.
Why does my Lottie animation work on the page but not in the Divi builder?
The Divi builder and the published front end do not always process external player scripts in the same way. If you see raw embed code or a blank area in the builder, save the page and test the front end, then inspect whether an optimisation, security or script-delay setting has blocked the player. A native Divi 5 module avoids most of this mismatch.
Which Lottie trigger should I use on mobile?
Use View or Click on mobile rather than Hover. Touch devices do not have a normal hover state, so a hover-triggered animation may never start for phone visitors. Use Load for a small animation that should begin immediately, and use View when the animation sits lower on the page and should start as visitors reach it.