Skip to content

How to Add Lottie Animation in WordPress?

Key Takeaways

  • Nexter Blocks Pro activa el bloque Lottie Animations, que se habilita en Nexter > Blocks dentro del panel de WordPress.
  • Lottie Animations acepta un archivo .json por URL o por Code, y el campo Play On ofrece Autoplay, Click, Hover, Viewport y Mouse Scroll.
  • Play Speed empieza en 0.5, así que una animación añadida con los ajustes predeterminados se reproduce a media velocidad hasta cambiarlo a 1.
  • Un bloque mal configurado muestra “JSON Parse Not Working” o “Opps!! Please Enter Only JSON File Extension.”, y un bloque con error puede impedir que otros Lottie blocks de la misma página animen.
Table of Contents

A Lottie animation is a small JSON file that plays as real vector artwork — sharp at any size and a fraction of the weight of a GIF or a video.

The Lottie Animations block loads one of those files and decides when it plays: on load, on hover, on click, when it scrolls into view, or frame by frame as the visitor scrolls.

Before You Start

  • Edition: Pro — the Lottie Animations block needs Nexter Blocks Pro.
  • Block to enable: Lottie Animations, switched on under Nexter > Blocks in your WordPress dashboard.

Video Tutorial

Steps

  1. Add the Lottie Animations block to your page.
Adding the Lottie Animations block
  1. Choose how to supply the file under JSON Input — URL for a link to a .json file, or Code to paste the file’s contents.
  1. Pick when it plays under Play On: Autoplay, Click, Hover, Viewport or Mouse Scroll.
Choosing when the animation plays
  1. Set Play Speed and looping. The speed starts at 0.5, which is half speed.
  1. Optionally switch on a heading, a description or a link, then publish and check the page.
Lottie Animation block, Layout Options panel in the Layout tab
Lottie Animation block, Lottie Style panel in the Style tab

The default play speed is 0.5, not 1. Measured on every test page: an animation added with default settings runs at half the speed its author designed. If it looks sluggish, set Play Speed to 1.

How It Behaves

This block plays a Lottie animation — a JSON file exported from After Effects or downloaded from a library such as LottieFiles. It does not create or edit the animation; it loads the file and controls when and how it plays.

  • Two ways to supply the animation. URL points at a hosted .json file, which the visitor’s browser fetches; Code stores the JSON inside the page itself. Both were measured rendering the same animation.
  • The file must end in .json. Measured on a published page with a .lottie URL: no animation loaded and the page showed the heading “Opps!! Please Enter Only JSON File Extension.” above the block. The newer dotLottie format is not accepted — download the plain JSON version instead.
  • Play On decides the trigger — all five were measured working. Autoplay and Viewport start on their own; Click and Hover hold the animation at its first frame until you act; Mouse Scroll ties the frame to the scroll position.
  • Total Loops means total plays. Measured: entering 3 plays the animation three times and stops. Leaving it blank with Loop switched on plays it forever.
  • Renderer can be SVG, Canvas or HTML. SVG and Canvas were both measured animating normally; SVG is the usual choice.

With no URL and no pasted code the block renders the text “JSON Parse Not Working” instead of an animation — measured, so an unconfigured block is visible rather than silently blank.

Limitations

  • Start and end points only work when you paste the JSON in, not when you load it from a URL. Measured with the same animation and the same settings: pasted JSON stayed inside the chosen range, while the URL version played the whole animation — identical to setting no range at all. If you need a custom range, set JSON Input to Code and paste the file’s contents. This is reported to the development team.
  • One misconfigured Lottie block stops every Lottie block on the same page. Measured: a block with no JSON, followed by a correctly configured block — the second one never animated at all. If several animations on a page stop working at once, look for one that is showing “JSON Parse Not Working” and fix or remove it. This is reported to the development team.
  • The block plays animations, it does not make them. Create the JSON in After Effects with the Bodymovin plugin, or download one from an animation library.
  • Only plain .json files are accepted — measured, a .lottie URL is rejected with a visible message.

Troubleshooting

The page says “JSON Parse Not Working”

The block has neither a URL nor pasted code. Add one of the two. Measured: this message renders in place of the animation.

The page says “Opps!! Please Enter Only JSON File Extension.”

The URL does not end in .json. A .lottie file will not load — download the plain JSON version of the same animation.

The animation looks too slow

Play Speed starts at 0.5. Measured on a default block: it runs at half speed until you change it. Set it to 1 for the animation’s intended speed.

Several animations on one page stopped working

Look for a Lottie block on the same page showing “JSON Parse Not Working”. Measured: one misconfigured block prevents every other Lottie block on that page from animating. Fixing or removing it restores the rest.

My start and end points are ignored

Measured: the range is applied only when the JSON is pasted in as Code. Loading the same file from a URL plays the whole animation. See the start and end points guide for the detail.

Related Docs

Share your Thoughts

Still in Doubt? Let’s Assist You

Have Feedback or Questions?

Join our WordPress Community on Facebook!

Related Frequently Asked Questions

What do I need before adding a Lottie animation in WordPress?

The block is part of Nexter Blocks Pro, so the Pro edition has to be active and the Lottie Animations block must be switched on under Nexter > Blocks in your WordPress dashboard. That matters because the block only loads a Lottie JSON file, it does not create one. The page also says the animation should come from After Effects with Bodymovin or from a library such as LottieFiles.

Should I use a JSON URL or paste the JSON code for a Lottie animation?

Both work, but they behave differently. A URL fetches a hosted .json file, while Code stores the JSON inside the page itself. The important gotcha is custom start and end points only work with pasted JSON, not with a URL. If you need a custom range, Code is the safer choice because URL-based animations play the full file.

Why is my Lottie animation showing 'JSON Parse Not Working'?

That message appears when the block has neither a JSON URL nor pasted code. In other words, the block is visible but unconfigured, so it shows text instead of staying blank. Adding either a valid .json URL or pasting the JSON content fixes that state and lets the animation load normally.

Why won't my .lottie file load in WordPress?

This block accepts only plain .json files. A .lottie URL is rejected and triggers the message 'Opps!! Please Enter Only JSON File Extension.' The practical fix is to download or export the plain JSON version of the same animation, because dotLottie is not accepted here.

Why does my Lottie animation play too slowly by default?

The default Play Speed starts at 0.5, which means half speed, not normal speed. That can make an animation feel sluggish even when everything else is configured correctly. Setting Play Speed to 1 restores the speed its author designed, which is usually what you want for a faithful playback.

Why did several Lottie animations on one page stop working at once?

One misconfigured Lottie block can stop every Lottie block on that page from animating. The page measured this with one block missing JSON and another correctly configured block that never played. If everything breaks together, look for a block showing 'JSON Parse Not Working' and fix or remove it first.

Last reviewed: September 28, 2026

Related Docs