No plugin needed. Add a Custom HTML block in Gutenberg and paste the lottie-player web component — it loads from a CDN and plays inline.
Download the Lottie JSON from Unicorn Icons. Upload it to any public host — your WordPress media library, a CDN, or an S3 bucket. You need a public HTTPS URL.
Open your page or post in the WordPress editor. Click + to add a block, search for 'Custom HTML', and add it.
Paste this into the Custom HTML block. Replace the src URL with your uploaded JSON file URL.
<script src="https://unpkg.com/@lottiefiles/lottie-player@latest/dist/lottie-player.js"></script>
<lottie-player
src="https://your-domain.com/your-animation.json"
background="transparent"
speed="1"
style="width: 150px; height: 150px;"
loop
autoplay>
</lottie-player>Replace autoplay with hover and the animation only plays when a visitor hovers over it.
<lottie-player
src="https://your-domain.com/your-animation.json"
background="transparent"
speed="1"
style="width: 150px; height: 150px;"
loop
hover>
</lottie-player>Using a page builder?
The same code works in any WordPress HTML embed — Elementor's HTML widget, Divi's Code module, or Beaver Builder's HTML module. Paste and save.
Do I need a plugin?
No. The Custom HTML block and lottie-player CDN script handle everything. No plugin installation needed.
Where do I put the JSON file?
Any public HTTPS URL works. Easiest: upload to WordPress Media Library. If it blocks the JSON filetype, rename it to .txt temporarily or use a CDN.
Works with Elementor/Divi?
Yes. Any HTML embed in any page builder works. Paste the same code from step 3 into the HTML widget/module.
Related guides
Get your animated icons
Browse icons ready for WordPress — free to download.