How To Add Lottie Animations To WordPress Websites

by | Oct 5, 2025 | Etcetera | 0 comments

Web site animations intended sluggish load instances and uneven playback, forcing you to choose from compressed GIFs that seemed horrible or large video information that despatched guests operating.

Lottie modified that dynamic. Those tiny JSON-based movement graphics scale to any display dimension with out shedding high quality and play smoother than GIFs ever may. The one downside is WordPress hasn’t relatively stuck up but, so including them takes a couple of further steps.

We’ll display you precisely the right way to get Lottie information operating in your WordPress web page and give an explanation for the shortcut that Divi 5 provides.

What Are Lottie Recordsdata?

Lottie information are JSON-based animations that retailer movement graphics as code as a substitute of pixels. Offered by way of Airbnb engineers in 2017, they solved internet animation’s greatest downside: record dimension. A posh animation that may be 5MB as a video turns into simply 50KB as a Lottie.

You’ll be able to create those in After Results and export the use of the Bodymovin or the LottieFiles plugin. The plugin converts your layers and keyframes into text-based directions. When browsers load this JSON record, they learn the maths and draw the animation in actual time.

Because it’s vector math reasonably than pixels, the similar record scales completely from telephone displays to 4K shows with out high quality loss.

How Lottie Recordsdata Paintings

Lottie information are JSON paperwork that describe layers, shapes, and keyframes. A Lottie JSON record is sort of a recipe for animations. On the best, you to find the fundamentals: body price, length, width, and top. Beneath this is an array of layers. Each and every layer has place, rotation, scale, and opacity, with keyframes that inform when and the right way to trade.

A Lottie record describes movement mathematically, now not as pictures. The participant calculates intermediate frames at the fly, so movement remains easy at any tool body price. Form layers can comprise teams of paths, fills, strokes, and transforms. Attributes like coloration (RGBA arrays), stroke width, and opacity are saved as numeric values.

Lottie Beats GIFs Each Time

Conventional codecs like GIF save each pixel of each body. A 30-second animation at 30 fps has 900 pictures with 1000’s of pixels, so GIFs develop massive temporarily as a result of they retailer frame-by-frame raster pictures with a 256-color palette.

A easy bouncing animation may also be 3 MB. GIFs best strengthen 256 colours, so gradients glance banded. Transparency is both totally clear or totally opaque, so edges glance tough.

Lottie makes use of vectors. The browser reads values and attracts every body from them. A transferring circle isn’t 500 pictures, however one circle with converting coordinates. This helps to keep information small and permits endless scaling. The information are readable and simple to edit.

With vectors, high quality remains very best at any dimension. Scaling a GIF makes it blocky as it makes use of raster pictures, whilst scaling a Lottie helps to keep edges sharp, due to vectors. The similar small record on cell may also be displayed with out adjustments on a 4K display. Report compression turns into issues much less since there’s not anything to compress past minimum textual content information.

A visual representation of how raster image scale compared to vector images

Lottie renders vector shapes with full-color gradients and alpha transparency by the use of the participant. Delicate shadows render with easy fades from 0 p.c to one hundred pc opacity.

Gradients keep easy as a substitute of changing into coloration bands. Each colour and tint exports precisely as designed in After Results, whether or not this is a comfortable glow impact or a posh coloration transition.

A visual representation of gradients renders in both formats

Why Your WordPress Web site Wishes Lottie Recordsdata

Your WordPress web page already works neatly, however guests be expecting greater than textual content and pictures. They would like visible cues that information them via content material, and small touches that make surfing really feel responsive. Lottie information ship this with out the technical overhead.

Lottie information may also be custom designed to create hover results on provider playing cards, animated clickable icons that may change simple buttons, or animations in testimonials. Those create micro-interactions that stay guests engaged. Those small moments upload as much as a web page that feels thoughtfully crafted.

Price range issues too. Skilled animations most often run $200-500 consistent with customized piece. Lottie libraries supply 1000’s of customizable choices free of charge or at a fragment of that value. You get broadcast-quality movement graphics that may most often require an company funds.

See also  5 Best Breadcrumb Plugins for WordPress

The place To In finding Lottie Recordsdata

Talking of, whilst you’ll be able to clearly create your personal Lottie information the use of Adobe After Results, it makes a lot more sensible sense to make use of readymade choices to be had available in the market, for it’s handy and, extra importantly, doesn’t require a lot technical abilities. Listed below are one of the crucial ubiquitous choices to be had to supply your Lottie information:

LottieFiles

The original Lottie marketplace hosts over 800,000 loose animations from 1000’s of designers. You’ll want an account to obtain, however the library covers the whole lot from loading spinners to advanced personality animations. The integrated editor permits you to regulate colours and pace earlier than downloading.

A screenshot of LottieFiles' homepage

It additionally provides Lottie Writer, which helps you to construct them on your browser. The AI Movement Copilot generates keyframes from textual content descriptions. You’ll be able to import SVGs and upload movement with out figuring out After Results.

IconScout

With 700K+ Lottie information, IconScout bridges the distance between loose and top rate content material. The platform shines with its direct plugins for Figma and WordPress. You get 2,167 loose animations with out attribution necessities. Their converter gear maintain batch processing between codecs, making it sensible for businesses managing more than one consumer tasks.

A screenshot of IconScout's homepage

Creattie

Creattie specializes in consistency over amount. Each and every animation follows strict high quality requirements, and collections proportion the similar visible taste. The loose tier provides masses of designs with out requiring bank card main points. Their power lies in industry-specific packs.

A screenshot of Creattie's homepage

Lordicon

Purely for animated icons, Lordicon delivers 37,200 choices throughout other kinds. The platform excels at UI parts: checkboxes, toggles, navigation arrows, and social media icons. Unfastened customers get entry to 1,490 icons. The editor helps fundamental coloration adjustments and stroke changes.

A screenshot of Lordicon's home page

How To Upload Lottie To WordPress

Now that we have got established why you wish to have Lottie animations to your web page, let’s read about the right way to upload them on your WordPress web page. It doesn’t strengthen Lottie information natively, so listed here are a couple of approaches you’ll be able to use:

The use of HTML Code

Including Lottie information with HTML has the least overhead however wishes extra technical talent.

The stairs are kind of the similar throughout suppliers, with some variation. With LottieFiles: select an animation, put it aside on your library, cross to Embed, and replica the code from the “Embed HTML” tab.

In WordPress, upload a Customized HTML block in Gutenberg and paste the code. You’ll be able to trade dimension, pace, and loop within the code attributes.

This system works with any web page builder that accepts customized HTML.

The use of A Lottie Plugin

Lottie plugins upload Lottie options to WordPress by the use of blocks or modules. There’s an respectable LottieFiles plugin

A screenshot of LottieFiles' page on WP plugin repo

and others like AM LottiePlayer and Lottie Player.

A screenshot of Lottie Player's listing on WordPress plugin repo

Some Gutenberg add-on plugins additionally come with Lottie blocks. Spectra (formerly Ultimate Addons for Gutenberg) has a Lottie animation block amongst its 30+ blocks. Otter Blocks comprises Lottie in its 20+ block library. Those paintings in the usual WordPress editor.

The method is identical throughout plugins: set up the plugin, then seek for “Lottie” within the block inserter. Some choices best help you seek, add information, or paste URLs, and others do all.

An example of the LottieFiles plugin working on Gutenberg

Maximum plugins be offering fundamental controls for background, dimension, triggers, colours, and extra.

Why Those Strategies Fall Quick

On the other hand, there are a number of downsides to either one of those strategies.

The place HTML Means Falls Quick

As a result of Gutenberg does now not display the animation within the editor, you will have to preview the web page, tweak the settings, and repeat till it appears proper. Additionally, animations are positioned in separate HTML blocks around the web page, so managing them feels scattered, and updating one way attempting to find the best block.

As well as, they depend on exterior products and services, so any downtime can destroy them abruptly. In consequence, even small adjustments like a background coloration power you to edit uncooked HTML, which will increase the chance of mistakes from nontechnical crew individuals.

Many animations load the Lottie script more than one instances for those who aren’t correctly optimizing it, which provides web page weight. After all, you’ll be able to’t regulate the dimensions, animations, and extra on mobiles with out requiring further CSS.

Why The use of A Lottie Plugin Isn’t Splendid Both

Whilst the plugin means is extra usable than HTML blocks, it will usher in further issues.

Maximum plugins lock excellent options in the back of a paywall. That is an extra rate on best of what you already pay for those who use top rate Lottie information. Plugins additionally decelerate WordPress by way of including needless code. They load further information on each web page, even if animations aren’t provide.

The LottieFiles plugin has quite a lot of recent reviews mentioning essential mistakes and admin efficiency problems — overview moderately in staging first.

A screenshot of negative reviews of the LottieFiles plugin

The plugin quite a bit lots of CSS code into WordPress admin spaces and pulls information from outdoor servers. Many of us say it crashed their complete web page when they put in it.

Extra importantly, regardless of which plugin you select, Gutenberg makes the use of animated graphics tricky. Easy adjustments turn into sluggish and tense; the entire enjoy would possibly really feel clunky and damaged.

See also  How To Create An Interactive Content Reveal Carousel With Divi 5

That’s why having a Lottie module within a devoted web page builder is a some distance awesome possibility. Web page developers deal with Lottie information like another design part. Drop them in, regulate the settings on display, and transfer on. The animation controls sit down proper subsequent on your typography and structure choices, the place they belong.

You best pay for the web page builder, as a substitute of separate plugins that destroy your web page or power you to leap between other interfaces. Divi 5 integrates Lottie as a firstclass module throughout the Visible Builder, so animation controls reside along your structure and typography.

Divi 5 Makes Lottie Recordsdata (And WordPress Design) In truth Easy

Divi runs on hundreds of thousands of WordPress websites, now not as a theme, however as a whole design machine. We constructed it for somebody who wishes skilled internet sites with out touching code.

You notice your web page precisely as guests will whilst you edit. Make a selection textual content, change colours, or rearrange complete sections, and watch the adjustments occur right away. There is not any back-and-forth between enhancing displays and preview modes.

The platform comes loaded with greater than 200 content modules in a position to make use of. Those come with fundamental textual content blocks and symbol galleries in addition to complicated pricing tables, testimonials, and get in touch with paperwork.

Divi 5 Is Made For The Long term Of WordPress

After two and a part years of construction, Divi 5 alpha arrived with totally new code. The unique framework couldn’t strengthen what we needed to construct subsequent, so each module and interplay were given rewritten.

A screenshot of Divi 5's new home page

This contemporary basis connects immediately with trendy WordPress functions. The payoff displays in every single place: responsive designs that paintings, layouts that snap in combination quicker, and styling choices the outdated structure couldn’t maintain. We didn’t patch what existed. We began over to construct one thing extra considerable.

A Lot Has Modified In Divi 5

  • The Lottie module quite a bit JSON animation information and provides you with controls for playback pace, triggers, and coloration changes with none coding. Different new inclusions are Staff Carousel, which creates sliders from any content material kind, and Icon Record, which creates customized bullet level designs.
  • Design Variables help you outline colours, fonts, and spacing values as soon as. Whilst you trade them, they routinely replace throughout all your web page.
  • HSL color controls calculate coloration relationships mathematically, so all your palette shifts proportionally while you regulate base colours.
  • The Responsive Editor shows how animations and settings behave on other display sizes, all over hover states, and with sticky positioning.
  • Flexbox changed the outdated structure machine, and you’ll be able to nest rows within different rows as many ranges deep as you wish to have.
  • Built-in interactions maintain popups, mouse hover results, scroll-based animations, and toggle switches with out requiring further plugins.
  • Thru visible controls, you’ll be able to use advanced CSS units, together with clamp(), calc(), REM, and viewport widths, with out writing code.
  • The brand new codebase deserted shortcodes for WordPress’s block layout and best quite a bit the modules every particular web page makes use of.
  • The interface comprises panels that may be docked anyplace, tabbed settings group, breadcrumb navigation, keyboard shortcuts, and a dismal mode possibility.
  • Option Group Presets help you save mixtures of typography, borders, shadows, and backgrounds to use throughout more than one parts.
  • The Loop Builder shows dynamic content material from customized put up varieties, ACF fields, WooCommerce merchandise, and repeater fields.

Upload Lottie To Divi In 3 Steps

Including Lottie animations to Divi 5 takes 3 steps. That’s it. No code snippets to stick, no plugin compatibility problems to debug, no exterior scripts to load. The Visible Builder handles the whole lot internally, treating animations like another module you’d drop onto a web page. You get the similar controls, the similar workflow, the similar speedy preview. Right here’s precisely the right way to set it up.

1. Allow JSON Uploads & Upload Your Lottie JSON

First, snatch your JSON record. Move to LottieFiles, IconScout, or any supply lined previous. In finding an animation you prefer. Click on obtain and make a choice JSON layout, now not the Lottie Internet Participant possibility.

Maximum websites mean you can select colours and sizes earlier than downloading. Do this now since you’ll be able to’t trade colours within Divi later.

WordPress blocks JSON information by way of default as it sees them as safety dangers. The repair takes two mins the use of a plugin like File Upload Types. However all the time consider to get your JSON information from depended on websites.

A screenshot of File Upload Types' page where JSON has been enabled

Now you’ll be able to upload Lottie information. Open any web page in Divi’s Visible Builder. Click on the grey plus icon the place you wish to have motion. In finding the Lottie module within the listing and upload it on your web page.

A screenshot of where to find the lottie module in Divi 5

Then, within the Lottie animations tab, click on on add and add your JSON record like all symbol. You’ll be able to additionally select one you uploaded earlier than. The record will display up with a file icon. Make a selection it.

The Lottie record has now been added on your Divi 5 web page.

2. Modify Animation And Taste

As soon as your animation quite a bit, the settings panel displays your keep watch over choices. Cause Animation comes to a decision when movement begins. On Load performs it straight away. View waits till the phase enters the viewport. Hover responds to mouse motion. Click on makes it tap-activated.

See also  Get a Free Business CV Layout Pack For Divi

Scroll to Animate ties animation frames to scroll place, so customers keep watch over playback by way of scrolling. This closing one creates probably the most attractive impact: scroll down and the animation strikes ahead, scroll up and reverses.

The Loop Animation toggle helps to keep it operating eternally. Flip it off for front animations that are supposed to play as soon as and forestall.

A screenshot of where to find the loop animation option in Divi 5

Animation Velocity defaults to at least one for traditional playback. Set it to 0.5 for part pace or crank it to two for double pace. Path runs it ahead or backward. Play Mode provides you with Commonplace or Soar, the place Soar performs ahead, then reverses again to the beginning.

The Design tab opens up Divi 5’s actual energy. You get the complicated devices box as a substitute of fundamental sliders. Sort 100vw to make your animation fill the display minus some padding.

Use clamp(25px, 3vw, 50px) so it scales easily between cell and desktop. Those CSS purposes paintings immediately within the enter fields, so no customized code is wanted. You’ll be able to additionally pull within the Quantity Design Variables you’ve created. This guarantees that your Lottie record makes use of constant values on every occasion wanted.

A screenshot of using clamp() values with vw and rems being used in lottie icons

Plus, it remains hooked up to a machine, so while you replace your Lottie dimension design variable, it routinely updates each Lottie record that references this Quantity variable.

Modify Settings For Other Display screen Sizes

Massive animations can paintings on desktops, however crush cell customers. In Divi’s Visible Builder, open the cell view the use of the responsive editor and reduce the animation dimension to no matter appears very best.

A screenshot of where to find the responsive editor option in Divi 5

You’ll be able to additionally use clamp() and identical devices to scale back the desire for per-breakpoint changes.

Detailed animations on giant displays are advanced to look on small ones. Simplify the movement or sluggish it from 1 to 0.5 on cell. Hover results don’t paintings on touchscreens, so trade the ones triggers to “View” so the animation begins when the phase scrolls into view.

Divi 5 permits you to use as much as seven responsive breakpoints as a substitute of simply 3. You’ll be able to transfer between breakpoints to check animations and tweak them temporarily.

A screenshot of where to find and enable breakpoints in Divi 5

3. Create Presets For Reusing It Throughout The Web site

After putting in place your Lottie animation precisely how you wish to have it, save the ones settings for reuse throughout your web page. Divi 5 splits this into two preset varieties.

Choice Staff Presets help you save particular taste teams. For instance, you could save the sizing values, or you’ll be able to save no matter works to your structure. You’ll be able to put it aside during the preset icon subsequent to that environment crew.

A screenshot of where to find the option group preset option in Divi 5

Title it one thing glaring like “Lottie Dimension”. Those presets paintings throughout any module kind. The precise spacing you created to your Lottie animation applies to photographs, textual content blocks, buttons, and anything else. When you wish to have the ones settings once more, click on the preset icon in any module and make a choice your stored preset.

Part Presets save the entire setup. The whole thing will get packaged in conjunction with the cause settings, animation pace, loop standing, and the entire design houses, together with sizes.

Hit the preset icon on the best left of the settings panel to save lots of the complete Lottie module as an Part Preset. With one click on, you’ll be able to drop that specific animation anyplace in your web page.

A screenshot of where to create element presets

Then, while you replace the preset, trade the animation pace from 1 to 0.5 within the preset, and each example of that animation throughout all your web page slows down routinely. You edit as soon as, and the trade flows in every single place that preset seems.

Check out Lottie Animations In Divi 5 Lately

Including Lottie information shouldn’t require plugin playing or HTML wrestling. Divi 5 comprises Lottie strengthen within the Visible Builder, sitting subsequent to Design Variables for constant colours, Flexbox layouts that paintings, and integrated interactions for hover results.

You add JSON information the similar manner you can upload any symbol. The Responsive Editor displays how your animations glance on telephones whilst you’re nonetheless enhancing at the desktop.

When the whole lot connects via one machine as a substitute of 5 other plugins, your web page remains rapid and your sanity remains intact.

The put up How To Add Lottie Animations To WordPress Websites seemed first on Elegant Themes Blog.

WordPress Maintenance Plans | WordPress Hosting

read more

0 Comments

Submit a Comment

DON'T LET YOUR WEBSITE GET DESTROYED BY HACKERS!

Get your FREE copy of our Cyber Security for WordPress® whitepaper.

You'll also get exclusive access to discounts that are only found at the bottom of our WP CyberSec whitepaper.

You have Successfully Subscribed!