{"id":38481,"date":"2023-01-04T07:00:18","date_gmt":"2023-01-04T15:00:18","guid":{"rendered":"https:\/\/dhblog.dream.press\/blog\/?p=38481"},"modified":"2026-08-07T16:24:27","modified_gmt":"2026-08-07T23:24:27","slug":"add-lottie-animations","status":"publish","type":"post","link":"https:\/\/www.dreamhost.com\/blog\/add-lottie-animations\/","title":{"rendered":"How to Add Lottie Animations to Your Site"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">There are three simple ways to add Lottie animations to your WordPress site: paste an animation\u2019s oEmbed URL into an Embed block, use the free <a href=\"https:\/\/wordpress.org\/plugins\/lottiefiles\/\" target=\"_blank\" rel=\"noopener\">LottieFiles plugin<\/a> for Gutenberg, or embed one manually with HTML and JavaScript. The first two take just a few minutes and require no code at all.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Lottie animations work well for loading indicators, interface feedback, and small illustrations. They\u2019re usually far lighter than GIFs, but too many looping animations can distract visitors and increase rendering work. <a href=\"https:\/\/lottiefiles.com\/\" target=\"_blank\" rel=\"noopener\">LottieFiles<\/a> provides a free library of animations you can add to <a href=\"https:\/\/www.dreamhost.com\/blog\/beginners-website-guide\/\" target=\"_blank\" rel=\"noopener\">your website<\/a> in minutes.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">In this post, we\u2019ll explain what a Lottie animation is and when it\u2019s worth using. Then, we\u2019ll walk through all three methods step by step, plus where to host your Lottie files and how to create your own animations. Let\u2019s get started!<\/p>\n\n\n\n<h2 id=\"h-what-is-a-lottie-animation\" class=\"wp-block-heading\"><b>What is a Lottie animation?<\/b><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">A Lottie animation is a lightweight, JSON-based vector animation format. Instead of storing video frames, a Lottie file describes shapes and motion as data, so it stays crisp at any size and is far smaller than a comparable GIF or video. A small JavaScript player renders the animation directly in the browser.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Lottie files come in two formats. A <strong>Lottie JSON<\/strong> file (.json) is the original, plain-text version. A <strong>dotLottie<\/strong> file (.lottie) is a newer, compressed container that bundles one or more animations and their assets into a single, smaller file, per <a href=\"https:\/\/github.com\/LottieFiles\/dotlottie-web\" target=\"_blank\" rel=\"noopener\">LottieFiles\u2019 dotLottie player documentation<\/a>. The LottieFiles WordPress plugin and LottieFiles\u2019 current web player both accept either format, so the methods below work with whichever file you download.<\/p>\n\n\n\n<h2 id=\"h-the-benefits-of-adding-lottie-animations-to-your-site\" class=\"wp-block-heading\"><b>The benefits of adding Lottie animations to your site<\/b><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">While videos and images can make your website more engaging, they\u2019re seen all over the internet. A well-placed animation, like a loading state or an animated icon, is rarer and does the same job with less weight.<\/p>\n\n\n\n\n\n\n\n<p class=\"wp-block-paragraph\"><a href=\"https:\/\/lottiefiles.com\/\" target=\"_blank\" rel=\"noopener\">Lottie animations<\/a> are an excellent choice, largely due to their small file sizes:<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter\"><img decoding=\"async\" width=\"1999\" height=\"954\" data-src=\"https:\/\/www.dreamhost.com\/blog\/wp-content\/smush-webp\/2023\/01\/lottiefiles-website-homepage.png.webp\" alt=\"LottieFiles website homepage\" class=\"wp-image-38495 lazyload\" data-srcset=\"https:\/\/www.dreamhost.com\/blog\/wp-content\/smush-webp\/2023\/01\/lottiefiles-website-homepage.png.webp 1999w, https:\/\/www.dreamhost.com\/blog\/wp-content\/uploads\/2023\/01\/lottiefiles-website-homepage-300x143.png 300w, https:\/\/www.dreamhost.com\/blog\/wp-content\/uploads\/2023\/01\/lottiefiles-website-homepage-1024x489.png 1024w, https:\/\/www.dreamhost.com\/blog\/wp-content\/uploads\/2023\/01\/lottiefiles-website-homepage-768x367.png 768w, https:\/\/www.dreamhost.com\/blog\/wp-content\/uploads\/2023\/01\/lottiefiles-website-homepage-1536x733.png 1536w, https:\/\/www.dreamhost.com\/blog\/wp-content\/smush-webp\/2023\/01\/lottiefiles-website-homepage-600x286.png.webp 600w, https:\/\/www.dreamhost.com\/blog\/wp-content\/smush-webp\/2023\/01\/lottiefiles-website-homepage-1200x573.png.webp 1200w, https:\/\/www.dreamhost.com\/blog\/wp-content\/smush-webp\/2023\/01\/lottiefiles-website-homepage-730x348.png.webp 730w, https:\/\/www.dreamhost.com\/blog\/wp-content\/smush-webp\/2023\/01\/lottiefiles-website-homepage-1460x697.png.webp 1460w, https:\/\/www.dreamhost.com\/blog\/wp-content\/smush-webp\/2023\/01\/lottiefiles-website-homepage-784x374.png.webp 784w, https:\/\/www.dreamhost.com\/blog\/wp-content\/smush-webp\/2023\/01\/lottiefiles-website-homepage-1568x748.png.webp 1568w, https:\/\/www.dreamhost.com\/blog\/wp-content\/smush-webp\/2023\/01\/lottiefiles-website-homepage-877x419.png.webp 877w, https:\/\/www.dreamhost.com\/blog\/wp-content\/smush-webp\/2023\/01\/lottiefiles-website-homepage-1754x837.png.webp 1754w\" data-sizes=\"(max-width: 1999px) 100vw, 1999px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 1999px; --smush-placeholder-aspect-ratio: 1999\/954;\" \/><\/figure>\n<\/div>\n\n\n<p class=\"wp-block-paragraph\">Per <a href=\"https:\/\/lottiefiles.com\/features\" target=\"_blank\" rel=\"noopener\">LottieFiles<\/a>, a Lottie animation is 600% smaller than a GIF (roughly one-sixth the size), so you can add one to your site without weighing anything down. Just remember that the player still uses CPU and memory to render each animation, so keep the number of looping animations per page modest.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Better yet, Lottie animations can be completely customized to suit <a href=\"https:\/\/www.dreamhost.com\/blog\/beginners-website-guide\/\" target=\"_blank\" rel=\"noopener\">your brand identity<\/a>. It\u2019s an affordable solution, too: LottieFiles offers over 50,000 free animations (including UI elements, characters, and illustrations) per its <a href=\"https:\/\/wordpress.org\/plugins\/lottiefiles\/\" target=\"_blank\" rel=\"noopener\">WordPress plugin listing<\/a>.<\/p>\n\n\n\n<div class=\"article-newsletter article-newsletter--gradient\">\n\n\n<h2>Get Content Delivered Straight to Your Inbox<\/h2><p>Subscribe now to receive all the latest updates, delivered directly to your inbox.<\/p><form class=\"nwsl-form\" id=\"newsletter_block_\" novalidate><div class=\"messages\"><\/div><div class=\"form-group\"><label for=\"input_newsletter_block_\"><input type=\"email\"name=\"email\"id=\"input_newsletter_block_\"placeholder=\"Enter your email address\"novalidatedisabled=\"disabled\"\/><\/label><button type=\"submit\"class=\"btn btn--brand\"disabled=\"disabled\"><span>Sign Me Up!<\/span><svg width=\"21\" height=\"14\" viewBox=\"0 0 21 14\" fill=\"none\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\">\n<path d=\"M13.8523 0.42524L12.9323 1.34521C12.7095 1.56801 12.7132 1.9304 12.9404 2.14865L16.7241 5.7823H0.5625C0.251859 5.7823 0 6.03416 0 6.3448V7.6573C0 7.96794 0.251859 8.2198 0.5625 8.2198H16.7241L12.9405 11.8535C12.7132 12.0717 12.7095 12.4341 12.9323 12.6569L13.8523 13.5769C14.072 13.7965 14.4281 13.7965 14.6478 13.5769L20.8259 7.39879C21.0456 7.17913 21.0456 6.82298 20.8259 6.60327L14.6477 0.42524C14.4281 0.205584 14.0719 0.205584 13.8523 0.42524Z\" fill=\"white\"\/>\n<\/svg>\n<\/button><\/div><\/form><\/div>\n\n\n<h2 id=\"h-how-to-add-lottie-animations-to-your-site-3-ways\" class=\"wp-block-heading\"><b>How to add Lottie animations to your site (3 ways)<\/b><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Now that you know the benefits of using Lottie animations, let\u2019s look at three ways to add them to your site.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-method-1-add-your-animation-with-oembed\"><b>Method 1: Add your animation with oEmbed<\/b><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Adding your Lottie animations through oEmbed is the simplest method in this guide. The only downside is that you won\u2019t be able to edit the animation settings or set them up to react to user interactions.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">To get started with this method, browse the <a href=\"https:\/\/lottiefiles.com\/featured\" target=\"_blank\" rel=\"noopener\">LottieFiles animations library<\/a> to find the perfect animation for your site. Once you find a design that you like, click on the animation and copy the oEmbed URL (you\u2019ll need to be logged into a free account to do this). Note that LottieFiles updates its interface regularly, so the screenshots in this guide may differ slightly from what you see today:<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter\"><img decoding=\"async\" width=\"1999\" height=\"1002\" data-src=\"https:\/\/www.dreamhost.com\/blog\/wp-content\/smush-webp\/2023\/01\/lottiefiles-copy-oembed-url.jpg.webp\" alt=\"Find the oEmbed URL in LottieFiles\" class=\"wp-image-38493 lazyload\" data-srcset=\"https:\/\/www.dreamhost.com\/blog\/wp-content\/smush-webp\/2023\/01\/lottiefiles-copy-oembed-url.jpg.webp 1999w, https:\/\/www.dreamhost.com\/blog\/wp-content\/uploads\/2023\/01\/lottiefiles-copy-oembed-url-300x150.jpg 300w, https:\/\/www.dreamhost.com\/blog\/wp-content\/uploads\/2023\/01\/lottiefiles-copy-oembed-url-1024x513.jpg 1024w, https:\/\/www.dreamhost.com\/blog\/wp-content\/uploads\/2023\/01\/lottiefiles-copy-oembed-url-768x385.jpg 768w, https:\/\/www.dreamhost.com\/blog\/wp-content\/uploads\/2023\/01\/lottiefiles-copy-oembed-url-1536x770.jpg 1536w, https:\/\/www.dreamhost.com\/blog\/wp-content\/smush-webp\/2023\/01\/lottiefiles-copy-oembed-url-600x301.jpg.webp 600w, https:\/\/www.dreamhost.com\/blog\/wp-content\/smush-webp\/2023\/01\/lottiefiles-copy-oembed-url-1200x602.jpg.webp 1200w, https:\/\/www.dreamhost.com\/blog\/wp-content\/smush-webp\/2023\/01\/lottiefiles-copy-oembed-url-730x366.jpg.webp 730w, https:\/\/www.dreamhost.com\/blog\/wp-content\/smush-webp\/2023\/01\/lottiefiles-copy-oembed-url-1460x732.jpg.webp 1460w, https:\/\/www.dreamhost.com\/blog\/wp-content\/smush-webp\/2023\/01\/lottiefiles-copy-oembed-url-784x393.jpg.webp 784w, https:\/\/www.dreamhost.com\/blog\/wp-content\/smush-webp\/2023\/01\/lottiefiles-copy-oembed-url-1568x786.jpg.webp 1568w, https:\/\/www.dreamhost.com\/blog\/wp-content\/smush-webp\/2023\/01\/lottiefiles-copy-oembed-url-877x440.jpg.webp 877w, https:\/\/www.dreamhost.com\/blog\/wp-content\/smush-webp\/2023\/01\/lottiefiles-copy-oembed-url-1754x879.jpg.webp 1754w\" data-sizes=\"(max-width: 1999px) 100vw, 1999px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 1999px; --smush-placeholder-aspect-ratio: 1999\/1002;\" \/><\/figure>\n<\/div>\n\n\n<p class=\"wp-block-paragraph\">Then, head to WordPress and open the page or post where you want to include your animation. Next, simply add a new <i>Embed<\/i> Gutenberg block:<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter\"><img decoding=\"async\" width=\"1999\" height=\"828\" data-src=\"https:\/\/www.dreamhost.com\/blog\/wp-content\/smush-webp\/2023\/01\/embed-block-in-wordpress.png.webp\" alt=\"Embed block in WordPress\" class=\"wp-image-38485 lazyload\" data-srcset=\"https:\/\/www.dreamhost.com\/blog\/wp-content\/smush-webp\/2023\/01\/embed-block-in-wordpress.png.webp 1999w, https:\/\/www.dreamhost.com\/blog\/wp-content\/uploads\/2023\/01\/embed-block-in-wordpress-300x124.png 300w, https:\/\/www.dreamhost.com\/blog\/wp-content\/uploads\/2023\/01\/embed-block-in-wordpress-1024x424.png 1024w, https:\/\/www.dreamhost.com\/blog\/wp-content\/uploads\/2023\/01\/embed-block-in-wordpress-768x318.png 768w, https:\/\/www.dreamhost.com\/blog\/wp-content\/uploads\/2023\/01\/embed-block-in-wordpress-1536x636.png 1536w, https:\/\/www.dreamhost.com\/blog\/wp-content\/smush-webp\/2023\/01\/embed-block-in-wordpress-600x249.png.webp 600w, https:\/\/www.dreamhost.com\/blog\/wp-content\/smush-webp\/2023\/01\/embed-block-in-wordpress-1200x497.png.webp 1200w, https:\/\/www.dreamhost.com\/blog\/wp-content\/smush-webp\/2023\/01\/embed-block-in-wordpress-730x302.png.webp 730w, https:\/\/www.dreamhost.com\/blog\/wp-content\/smush-webp\/2023\/01\/embed-block-in-wordpress-1460x605.png.webp 1460w, https:\/\/www.dreamhost.com\/blog\/wp-content\/smush-webp\/2023\/01\/embed-block-in-wordpress-784x325.png.webp 784w, https:\/\/www.dreamhost.com\/blog\/wp-content\/smush-webp\/2023\/01\/embed-block-in-wordpress-1568x649.png.webp 1568w, https:\/\/www.dreamhost.com\/blog\/wp-content\/smush-webp\/2023\/01\/embed-block-in-wordpress-877x363.png.webp 877w, https:\/\/www.dreamhost.com\/blog\/wp-content\/smush-webp\/2023\/01\/embed-block-in-wordpress-1754x727.png.webp 1754w\" data-sizes=\"(max-width: 1999px) 100vw, 1999px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 1999px; --smush-placeholder-aspect-ratio: 1999\/828;\" \/><\/figure>\n<\/div>\n\n\n<p class=\"wp-block-paragraph\">Now, paste the oEmbed URL that you copied from the Lottie website:<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter\"><img decoding=\"async\" width=\"1999\" height=\"616\" data-src=\"https:\/\/www.dreamhost.com\/blog\/wp-content\/smush-webp\/2023\/01\/paste-lottie-html-code-into-custom-html-wordpress-block.png.webp\" alt=\"Paste the oEmbed Lottie URL into the Embed WordPress block\" class=\"wp-image-38496 lazyload\" data-srcset=\"https:\/\/www.dreamhost.com\/blog\/wp-content\/smush-webp\/2023\/01\/paste-lottie-html-code-into-custom-html-wordpress-block.png.webp 1999w, https:\/\/www.dreamhost.com\/blog\/wp-content\/uploads\/2023\/01\/paste-lottie-html-code-into-custom-html-wordpress-block-300x92.png 300w, https:\/\/www.dreamhost.com\/blog\/wp-content\/uploads\/2023\/01\/paste-lottie-html-code-into-custom-html-wordpress-block-1024x316.png 1024w, https:\/\/www.dreamhost.com\/blog\/wp-content\/uploads\/2023\/01\/paste-lottie-html-code-into-custom-html-wordpress-block-768x237.png 768w, https:\/\/www.dreamhost.com\/blog\/wp-content\/uploads\/2023\/01\/paste-lottie-html-code-into-custom-html-wordpress-block-1536x473.png 1536w, https:\/\/www.dreamhost.com\/blog\/wp-content\/smush-webp\/2023\/01\/paste-lottie-html-code-into-custom-html-wordpress-block-600x185.png.webp 600w, https:\/\/www.dreamhost.com\/blog\/wp-content\/smush-webp\/2023\/01\/paste-lottie-html-code-into-custom-html-wordpress-block-1200x370.png.webp 1200w, https:\/\/www.dreamhost.com\/blog\/wp-content\/smush-webp\/2023\/01\/paste-lottie-html-code-into-custom-html-wordpress-block-730x225.png.webp 730w, https:\/\/www.dreamhost.com\/blog\/wp-content\/smush-webp\/2023\/01\/paste-lottie-html-code-into-custom-html-wordpress-block-1460x450.png.webp 1460w, https:\/\/www.dreamhost.com\/blog\/wp-content\/smush-webp\/2023\/01\/paste-lottie-html-code-into-custom-html-wordpress-block-784x242.png.webp 784w, https:\/\/www.dreamhost.com\/blog\/wp-content\/smush-webp\/2023\/01\/paste-lottie-html-code-into-custom-html-wordpress-block-1568x483.png.webp 1568w, https:\/\/www.dreamhost.com\/blog\/wp-content\/smush-webp\/2023\/01\/paste-lottie-html-code-into-custom-html-wordpress-block-877x270.png.webp 877w, https:\/\/www.dreamhost.com\/blog\/wp-content\/smush-webp\/2023\/01\/paste-lottie-html-code-into-custom-html-wordpress-block-1754x541.png.webp 1754w\" data-sizes=\"(max-width: 1999px) 100vw, 1999px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 1999px; --smush-placeholder-aspect-ratio: 1999\/616;\" \/><\/figure>\n<\/div>\n\n\n<p class=\"wp-block-paragraph\">Hit the <i>Embed<\/i> button to confirm the action.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">At this point, you should see the animation appear on your page:<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter\"><img decoding=\"async\" width=\"1999\" height=\"838\" data-src=\"https:\/\/www.dreamhost.com\/blog\/wp-content\/smush-webp\/2023\/01\/embed-lottie-animation-in-wordpress.jpg.webp\" alt=\"Embed your Lottie animation in WordPress\" class=\"wp-image-38486 lazyload\" data-srcset=\"https:\/\/www.dreamhost.com\/blog\/wp-content\/smush-webp\/2023\/01\/embed-lottie-animation-in-wordpress.jpg.webp 1999w, https:\/\/www.dreamhost.com\/blog\/wp-content\/uploads\/2023\/01\/embed-lottie-animation-in-wordpress-300x126.jpg 300w, https:\/\/www.dreamhost.com\/blog\/wp-content\/uploads\/2023\/01\/embed-lottie-animation-in-wordpress-1024x429.jpg 1024w, https:\/\/www.dreamhost.com\/blog\/wp-content\/uploads\/2023\/01\/embed-lottie-animation-in-wordpress-768x322.jpg 768w, https:\/\/www.dreamhost.com\/blog\/wp-content\/uploads\/2023\/01\/embed-lottie-animation-in-wordpress-1536x644.jpg 1536w, https:\/\/www.dreamhost.com\/blog\/wp-content\/smush-webp\/2023\/01\/embed-lottie-animation-in-wordpress-600x252.jpg.webp 600w, https:\/\/www.dreamhost.com\/blog\/wp-content\/smush-webp\/2023\/01\/embed-lottie-animation-in-wordpress-1200x503.jpg.webp 1200w, https:\/\/www.dreamhost.com\/blog\/wp-content\/smush-webp\/2023\/01\/embed-lottie-animation-in-wordpress-730x306.jpg.webp 730w, https:\/\/www.dreamhost.com\/blog\/wp-content\/smush-webp\/2023\/01\/embed-lottie-animation-in-wordpress-1460x612.jpg.webp 1460w, https:\/\/www.dreamhost.com\/blog\/wp-content\/smush-webp\/2023\/01\/embed-lottie-animation-in-wordpress-784x329.jpg.webp 784w, https:\/\/www.dreamhost.com\/blog\/wp-content\/smush-webp\/2023\/01\/embed-lottie-animation-in-wordpress-1568x657.jpg.webp 1568w, https:\/\/www.dreamhost.com\/blog\/wp-content\/smush-webp\/2023\/01\/embed-lottie-animation-in-wordpress-877x368.jpg.webp 877w, https:\/\/www.dreamhost.com\/blog\/wp-content\/smush-webp\/2023\/01\/embed-lottie-animation-in-wordpress-1754x735.jpg.webp 1754w\" data-sizes=\"(max-width: 1999px) 100vw, 1999px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 1999px; --smush-placeholder-aspect-ratio: 1999\/838;\" \/><\/figure>\n<\/div>\n\n\n<p class=\"wp-block-paragraph\">As we mentioned earlier, you won\u2019t be able to customize the animation once you\u2019ve added it to your WordPress page or post. Therefore, it\u2019s crucial you make all the edits you want beforehand while you\u2019re still on the Lottie website.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-method-2-add-your-animation-using-the-lottie-block-for-gutenberg-plugin\"><b>Method 2: Add your animation using the <\/b><a href=\"https:\/\/wordpress.org\/plugins\/lottiefiles\/\" target=\"_blank\" rel=\"noopener\"><b>LottieFiles<\/b><\/a><b> plugin<\/b><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">While the oEmbed method is the simplest, using the LottieFiles plugin (formerly named \u201cLottie block for Gutenberg\u201d) is also very easy. Plus, it allows you to immediately preview any changes you make to your designs.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">First off, go to <i>Plugins <\/i>&gt; <i>Add New <\/i>to install and activate <a href=\"https:\/\/wordpress.org\/plugins\/lottiefiles\/\" target=\"_blank\" rel=\"noopener\">the LottieFiles<\/a> plugin in WordPress:<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter\"><img decoding=\"async\" width=\"1857\" height=\"602\" data-src=\"https:\/\/www.dreamhost.com\/blog\/wp-content\/smush-webp\/2023\/01\/lottie-blocks-for-gutenberg-plugin.png.webp\" alt=\"Lottie block for Gutenberg plugin\" class=\"wp-image-38490 lazyload\" data-srcset=\"https:\/\/www.dreamhost.com\/blog\/wp-content\/smush-webp\/2023\/01\/lottie-blocks-for-gutenberg-plugin.png.webp 1857w, https:\/\/www.dreamhost.com\/blog\/wp-content\/uploads\/2023\/01\/lottie-blocks-for-gutenberg-plugin-300x97.png 300w, https:\/\/www.dreamhost.com\/blog\/wp-content\/uploads\/2023\/01\/lottie-blocks-for-gutenberg-plugin-1024x332.png 1024w, https:\/\/www.dreamhost.com\/blog\/wp-content\/uploads\/2023\/01\/lottie-blocks-for-gutenberg-plugin-768x249.png 768w, https:\/\/www.dreamhost.com\/blog\/wp-content\/uploads\/2023\/01\/lottie-blocks-for-gutenberg-plugin-1536x498.png 1536w, https:\/\/www.dreamhost.com\/blog\/wp-content\/smush-webp\/2023\/01\/lottie-blocks-for-gutenberg-plugin-600x195.png.webp 600w, https:\/\/www.dreamhost.com\/blog\/wp-content\/smush-webp\/2023\/01\/lottie-blocks-for-gutenberg-plugin-1200x389.png.webp 1200w, https:\/\/www.dreamhost.com\/blog\/wp-content\/smush-webp\/2023\/01\/lottie-blocks-for-gutenberg-plugin-730x237.png.webp 730w, https:\/\/www.dreamhost.com\/blog\/wp-content\/smush-webp\/2023\/01\/lottie-blocks-for-gutenberg-plugin-1460x473.png.webp 1460w, https:\/\/www.dreamhost.com\/blog\/wp-content\/smush-webp\/2023\/01\/lottie-blocks-for-gutenberg-plugin-784x254.png.webp 784w, https:\/\/www.dreamhost.com\/blog\/wp-content\/smush-webp\/2023\/01\/lottie-blocks-for-gutenberg-plugin-1568x508.png.webp 1568w, https:\/\/www.dreamhost.com\/blog\/wp-content\/smush-webp\/2023\/01\/lottie-blocks-for-gutenberg-plugin-877x284.png.webp 877w, https:\/\/www.dreamhost.com\/blog\/wp-content\/smush-webp\/2023\/01\/lottie-blocks-for-gutenberg-plugin-1754x569.png.webp 1754w\" data-sizes=\"(max-width: 1857px) 100vw, 1857px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 1857px; --smush-placeholder-aspect-ratio: 1857\/602;\" \/><\/figure>\n<\/div>\n\n\n<p class=\"wp-block-paragraph\">You can then log into your LottieFiles account or create an account for free.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Next, add a new block in the Gutenberg editor. Search for the <i>Lottie<\/i> block and add it to your page:<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter\"><img decoding=\"async\" width=\"1999\" height=\"776\" data-src=\"https:\/\/www.dreamhost.com\/blog\/wp-content\/smush-webp\/2023\/01\/wordpress-lottie-block.png.webp\" alt=\"Search for the Lottie block in WordPress\" class=\"wp-image-38500 lazyload\" data-srcset=\"https:\/\/www.dreamhost.com\/blog\/wp-content\/smush-webp\/2023\/01\/wordpress-lottie-block.png.webp 1999w, https:\/\/www.dreamhost.com\/blog\/wp-content\/uploads\/2023\/01\/wordpress-lottie-block-300x116.png 300w, https:\/\/www.dreamhost.com\/blog\/wp-content\/uploads\/2023\/01\/wordpress-lottie-block-1024x398.png 1024w, https:\/\/www.dreamhost.com\/blog\/wp-content\/uploads\/2023\/01\/wordpress-lottie-block-768x298.png 768w, https:\/\/www.dreamhost.com\/blog\/wp-content\/uploads\/2023\/01\/wordpress-lottie-block-1536x596.png 1536w, https:\/\/www.dreamhost.com\/blog\/wp-content\/smush-webp\/2023\/01\/wordpress-lottie-block-600x233.png.webp 600w, https:\/\/www.dreamhost.com\/blog\/wp-content\/smush-webp\/2023\/01\/wordpress-lottie-block-1200x466.png.webp 1200w, https:\/\/www.dreamhost.com\/blog\/wp-content\/smush-webp\/2023\/01\/wordpress-lottie-block-730x283.png.webp 730w, https:\/\/www.dreamhost.com\/blog\/wp-content\/smush-webp\/2023\/01\/wordpress-lottie-block-1460x567.png.webp 1460w, https:\/\/www.dreamhost.com\/blog\/wp-content\/smush-webp\/2023\/01\/wordpress-lottie-block-784x304.png.webp 784w, https:\/\/www.dreamhost.com\/blog\/wp-content\/smush-webp\/2023\/01\/wordpress-lottie-block-1568x609.png.webp 1568w, https:\/\/www.dreamhost.com\/blog\/wp-content\/smush-webp\/2023\/01\/wordpress-lottie-block-877x340.png.webp 877w, https:\/\/www.dreamhost.com\/blog\/wp-content\/smush-webp\/2023\/01\/wordpress-lottie-block-1754x681.png.webp 1754w\" data-sizes=\"(max-width: 1999px) 100vw, 1999px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 1999px; --smush-placeholder-aspect-ratio: 1999\/776;\" \/><\/figure>\n<\/div>\n\n\n<p class=\"wp-block-paragraph\">Here, you\u2019ll find three ways to insert a Lottie animation in WordPress:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Click on <i>Discover animation <\/i>to browse the LottieFiles library (you\u2019ll need an account to do this).<\/li>\n\n\n\n<li>Select <i>Media Library <\/i>to find an animation you\u2019ve previously uploaded.<\/li>\n\n\n\n<li>Hit <i>Insert from URL<\/i> to paste a JSON link.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">If you choose the final method, you can find the JSON link on the Lottie website:<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter\"><img decoding=\"async\" width=\"1999\" height=\"1127\" data-src=\"https:\/\/www.dreamhost.com\/blog\/wp-content\/smush-webp\/2023\/01\/lottie-json-url.jpg.webp\" alt=\"Lottie JSON URL\" class=\"wp-image-38491 lazyload\" data-srcset=\"https:\/\/www.dreamhost.com\/blog\/wp-content\/smush-webp\/2023\/01\/lottie-json-url.jpg.webp 1999w, https:\/\/www.dreamhost.com\/blog\/wp-content\/uploads\/2023\/01\/lottie-json-url-300x169.jpg 300w, https:\/\/www.dreamhost.com\/blog\/wp-content\/uploads\/2023\/01\/lottie-json-url-1024x577.jpg 1024w, https:\/\/www.dreamhost.com\/blog\/wp-content\/uploads\/2023\/01\/lottie-json-url-768x433.jpg 768w, https:\/\/www.dreamhost.com\/blog\/wp-content\/uploads\/2023\/01\/lottie-json-url-1536x866.jpg 1536w, https:\/\/www.dreamhost.com\/blog\/wp-content\/smush-webp\/2023\/01\/lottie-json-url-600x338.jpg.webp 600w, https:\/\/www.dreamhost.com\/blog\/wp-content\/smush-webp\/2023\/01\/lottie-json-url-1200x677.jpg.webp 1200w, https:\/\/www.dreamhost.com\/blog\/wp-content\/smush-webp\/2023\/01\/lottie-json-url-730x412.jpg.webp 730w, https:\/\/www.dreamhost.com\/blog\/wp-content\/smush-webp\/2023\/01\/lottie-json-url-1460x823.jpg.webp 1460w, https:\/\/www.dreamhost.com\/blog\/wp-content\/smush-webp\/2023\/01\/lottie-json-url-784x442.jpg.webp 784w, https:\/\/www.dreamhost.com\/blog\/wp-content\/smush-webp\/2023\/01\/lottie-json-url-1568x884.jpg.webp 1568w, https:\/\/www.dreamhost.com\/blog\/wp-content\/smush-webp\/2023\/01\/lottie-json-url-877x494.jpg.webp 877w, https:\/\/www.dreamhost.com\/blog\/wp-content\/smush-webp\/2023\/01\/lottie-json-url-1754x989.jpg.webp 1754w\" data-sizes=\"(max-width: 1999px) 100vw, 1999px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 1999px; --smush-placeholder-aspect-ratio: 1999\/1127;\" \/><\/figure>\n<\/div>\n\n\n<p class=\"wp-block-paragraph\">Once you\u2019ve added the animation to your page, you can preview the design in Gutenberg:<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter\"><img decoding=\"async\" width=\"1999\" height=\"836\" data-src=\"https:\/\/www.dreamhost.com\/blog\/wp-content\/smush-webp\/2023\/01\/preview-lottie-animation-in-gutenberg.png.webp\" alt=\"Preview of the purple owl animation in Gutenberg\" class=\"wp-image-38498 lazyload\" data-srcset=\"https:\/\/www.dreamhost.com\/blog\/wp-content\/smush-webp\/2023\/01\/preview-lottie-animation-in-gutenberg.png.webp 1999w, https:\/\/www.dreamhost.com\/blog\/wp-content\/uploads\/2023\/01\/preview-lottie-animation-in-gutenberg-300x125.png 300w, https:\/\/www.dreamhost.com\/blog\/wp-content\/uploads\/2023\/01\/preview-lottie-animation-in-gutenberg-1024x428.png 1024w, https:\/\/www.dreamhost.com\/blog\/wp-content\/uploads\/2023\/01\/preview-lottie-animation-in-gutenberg-768x321.png 768w, https:\/\/www.dreamhost.com\/blog\/wp-content\/uploads\/2023\/01\/preview-lottie-animation-in-gutenberg-1536x642.png 1536w, https:\/\/www.dreamhost.com\/blog\/wp-content\/smush-webp\/2023\/01\/preview-lottie-animation-in-gutenberg-600x251.png.webp 600w, https:\/\/www.dreamhost.com\/blog\/wp-content\/smush-webp\/2023\/01\/preview-lottie-animation-in-gutenberg-1200x502.png.webp 1200w, https:\/\/www.dreamhost.com\/blog\/wp-content\/smush-webp\/2023\/01\/preview-lottie-animation-in-gutenberg-730x305.png.webp 730w, https:\/\/www.dreamhost.com\/blog\/wp-content\/smush-webp\/2023\/01\/preview-lottie-animation-in-gutenberg-1460x611.png.webp 1460w, https:\/\/www.dreamhost.com\/blog\/wp-content\/smush-webp\/2023\/01\/preview-lottie-animation-in-gutenberg-784x328.png.webp 784w, https:\/\/www.dreamhost.com\/blog\/wp-content\/smush-webp\/2023\/01\/preview-lottie-animation-in-gutenberg-1568x656.png.webp 1568w, https:\/\/www.dreamhost.com\/blog\/wp-content\/smush-webp\/2023\/01\/preview-lottie-animation-in-gutenberg-877x367.png.webp 877w, https:\/\/www.dreamhost.com\/blog\/wp-content\/smush-webp\/2023\/01\/preview-lottie-animation-in-gutenberg-1754x734.png.webp 1754w\" data-sizes=\"(max-width: 1999px) 100vw, 1999px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 1999px; --smush-placeholder-aspect-ratio: 1999\/836;\" \/><\/figure>\n<\/div>\n\n\n<p class=\"wp-block-paragraph\">Now, in the <i>Block<\/i> settings, you can customize your animation. For instance, you can give it a transparent background, change the dimensions, or trigger the animation with different actions. You can also use the plugin to <a href=\"https:\/\/www.youtube.com\/watch?v=i2LP34t__Yc\" target=\"_blank\" rel=\"noopener\">add a Lottie animation as a WordPress background<\/a>.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-method-3-add-your-animation-with-html-and-javascript\"><b>Method 3: Add your animation with HTML and JavaScript<\/b><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Adding your Lottie animation with HTML and JavaScript is still fairly easy, but it\u2019s the most complex method. Plus, you aren\u2019t able to see updates in real time. Instead, you have to switch between Gutenberg and your website to preview your changes. Still, you may want to use this method if you\u2019re <a href=\"https:\/\/www.dreamhost.com\/blog\/learn-html\/\" target=\"_blank\" rel=\"noopener\">familiar with HTML<\/a> and looking for enhanced customization options.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">One important note before we start: older tutorials (including a previous version of this one) used the <span style=\"font-family: 'courier new', courier, monospace;\">lottie-player<\/span> web component. LottieFiles has <a href=\"https:\/\/github.com\/LottieFiles\/lottie-player\" target=\"_blank\" rel=\"noopener\">deprecated that player<\/a> and recommends the <span style=\"font-family: 'courier new', courier, monospace;\">@lottiefiles\/dotlottie-wc<\/span> web component instead, so that\u2019s what we\u2019ll use below.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">To get started, click on the animation in the LottieFiles library and copy the animation\u2019s file link (a URL ending in .lottie or .json):<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter\"><img decoding=\"async\" width=\"1999\" height=\"1127\" data-src=\"https:\/\/www.dreamhost.com\/blog\/wp-content\/smush-webp\/2023\/01\/lottie-json-url.jpg.webp\" alt=\"Lottie JSON URL\" class=\"wp-image-38491 lazyload\" data-srcset=\"https:\/\/www.dreamhost.com\/blog\/wp-content\/smush-webp\/2023\/01\/lottie-json-url.jpg.webp 1999w, https:\/\/www.dreamhost.com\/blog\/wp-content\/uploads\/2023\/01\/lottie-json-url-300x169.jpg 300w, https:\/\/www.dreamhost.com\/blog\/wp-content\/uploads\/2023\/01\/lottie-json-url-1024x577.jpg 1024w, https:\/\/www.dreamhost.com\/blog\/wp-content\/uploads\/2023\/01\/lottie-json-url-768x433.jpg 768w, https:\/\/www.dreamhost.com\/blog\/wp-content\/uploads\/2023\/01\/lottie-json-url-1536x866.jpg 1536w, https:\/\/www.dreamhost.com\/blog\/wp-content\/smush-webp\/2023\/01\/lottie-json-url-600x338.jpg.webp 600w, https:\/\/www.dreamhost.com\/blog\/wp-content\/smush-webp\/2023\/01\/lottie-json-url-1200x677.jpg.webp 1200w, https:\/\/www.dreamhost.com\/blog\/wp-content\/smush-webp\/2023\/01\/lottie-json-url-730x412.jpg.webp 730w, https:\/\/www.dreamhost.com\/blog\/wp-content\/smush-webp\/2023\/01\/lottie-json-url-1460x823.jpg.webp 1460w, https:\/\/www.dreamhost.com\/blog\/wp-content\/smush-webp\/2023\/01\/lottie-json-url-784x442.jpg.webp 784w, https:\/\/www.dreamhost.com\/blog\/wp-content\/smush-webp\/2023\/01\/lottie-json-url-1568x884.jpg.webp 1568w, https:\/\/www.dreamhost.com\/blog\/wp-content\/smush-webp\/2023\/01\/lottie-json-url-877x494.jpg.webp 877w, https:\/\/www.dreamhost.com\/blog\/wp-content\/smush-webp\/2023\/01\/lottie-json-url-1754x989.jpg.webp 1754w\" data-sizes=\"(max-width: 1999px) 100vw, 1999px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 1999px; --smush-placeholder-aspect-ratio: 1999\/1127;\" \/><\/figure>\n<\/div>\n\n\n<p class=\"wp-block-paragraph\">Then, in WordPress, open the page or post where you want the animation and add a new <i>Custom HTML<\/i> block:<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter\"><img decoding=\"async\" width=\"1999\" height=\"858\" data-src=\"https:\/\/www.dreamhost.com\/blog\/wp-content\/smush-webp\/2023\/01\/add-custom-html-block-wordpress-editor.png.webp\" alt=\"Adding a new Custom HTML block in the WordPress editor\" class=\"wp-image-38482 lazyload\" data-srcset=\"https:\/\/www.dreamhost.com\/blog\/wp-content\/smush-webp\/2023\/01\/add-custom-html-block-wordpress-editor.png.webp 1999w, https:\/\/www.dreamhost.com\/blog\/wp-content\/uploads\/2023\/01\/add-custom-html-block-wordpress-editor-300x129.png 300w, https:\/\/www.dreamhost.com\/blog\/wp-content\/uploads\/2023\/01\/add-custom-html-block-wordpress-editor-1024x440.png 1024w, https:\/\/www.dreamhost.com\/blog\/wp-content\/uploads\/2023\/01\/add-custom-html-block-wordpress-editor-768x330.png 768w, https:\/\/www.dreamhost.com\/blog\/wp-content\/uploads\/2023\/01\/add-custom-html-block-wordpress-editor-1536x659.png 1536w, https:\/\/www.dreamhost.com\/blog\/wp-content\/smush-webp\/2023\/01\/add-custom-html-block-wordpress-editor-600x258.png.webp 600w, https:\/\/www.dreamhost.com\/blog\/wp-content\/smush-webp\/2023\/01\/add-custom-html-block-wordpress-editor-1200x515.png.webp 1200w, https:\/\/www.dreamhost.com\/blog\/wp-content\/smush-webp\/2023\/01\/add-custom-html-block-wordpress-editor-730x313.png.webp 730w, https:\/\/www.dreamhost.com\/blog\/wp-content\/smush-webp\/2023\/01\/add-custom-html-block-wordpress-editor-1460x627.png.webp 1460w, https:\/\/www.dreamhost.com\/blog\/wp-content\/smush-webp\/2023\/01\/add-custom-html-block-wordpress-editor-784x337.png.webp 784w, https:\/\/www.dreamhost.com\/blog\/wp-content\/smush-webp\/2023\/01\/add-custom-html-block-wordpress-editor-1568x673.png.webp 1568w, https:\/\/www.dreamhost.com\/blog\/wp-content\/smush-webp\/2023\/01\/add-custom-html-block-wordpress-editor-877x376.png.webp 877w, https:\/\/www.dreamhost.com\/blog\/wp-content\/smush-webp\/2023\/01\/add-custom-html-block-wordpress-editor-1754x753.png.webp 1754w\" data-sizes=\"(max-width: 1999px) 100vw, 1999px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 1999px; --smush-placeholder-aspect-ratio: 1999\/858;\" \/><\/figure>\n<\/div>\n\n\n<p class=\"wp-block-paragraph\">Paste in the player element, replacing the <span style=\"font-family: 'courier new', courier, monospace;\">src<\/span> value with the link you just copied, and click on <i>Save Draft<\/i>:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;dotlottie-wc src=\"YOUR-ANIMATION-URL.lottie\" style=\"width: 300px; height: 300px\" loop autoplay&gt;&lt;\/dotlottie-wc&gt;<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">The <span style=\"font-family: 'courier new', courier, monospace;\">loop<\/span> and <span style=\"font-family: 'courier new', courier, monospace;\">autoplay<\/span> attributes are optional. Remove them when continuous motion isn\u2019t necessary, and test your page with your device\u2019s reduced-motion preference turned on so visitors who are sensitive to motion aren\u2019t overwhelmed.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Your animation won\u2019t work just yet. First, you\u2019ll need to load the dotLottie player JavaScript file in WordPress. A quick security lesson before you do: in October 2024, the old lottie-player package was <a href=\"https:\/\/en.wikipedia.org\/wiki\/Lottie_(file_format)\" target=\"_blank\" rel=\"noopener\">briefly compromised<\/a>, and the malicious code reached sites that loaded the player\u2019s \u201clatest\u201d version from a CDN. That\u2019s why you should always pin a specific, verified version number in your script tag instead of <span style=\"font-family: 'courier new', courier, monospace;\">@latest<\/span>, like this:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;script src=\"https:\/\/unpkg.com\/@lottiefiles\/dotlottie-wc@0.9.25\/dist\/dotlottie-wc.js\" type=\"module\"&gt;&lt;\/script&gt;<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Version 0.9.25 was current in August 2026. Check the <a href=\"https:\/\/app.unpkg.com\/@lottiefiles\/dotlottie-wc\" target=\"_blank\" rel=\"noopener\">package\u2019s version listing<\/a> for the newest release before copying this tag, and keep the version pinned rather than using <span style=\"font-family: 'courier new', courier, monospace;\">@latest<\/span>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">To add that script site-wide, install the <a href=\"https:\/\/wordpress.org\/plugins\/custom-css-js\/\" target=\"_blank\" rel=\"noopener\">Simple Custom CSS and JS plugin<\/a>:<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter\"><img decoding=\"async\" width=\"1999\" height=\"585\" data-src=\"https:\/\/www.dreamhost.com\/blog\/wp-content\/smush-webp\/2023\/01\/simple-custom-css-js-plugin.png.webp\" alt=\"Install the Simple Custom CSS and JS plugin\" class=\"wp-image-38499 lazyload\" data-srcset=\"https:\/\/www.dreamhost.com\/blog\/wp-content\/smush-webp\/2023\/01\/simple-custom-css-js-plugin.png.webp 1999w, https:\/\/www.dreamhost.com\/blog\/wp-content\/uploads\/2023\/01\/simple-custom-css-js-plugin-300x88.png 300w, https:\/\/www.dreamhost.com\/blog\/wp-content\/uploads\/2023\/01\/simple-custom-css-js-plugin-1024x300.png 1024w, https:\/\/www.dreamhost.com\/blog\/wp-content\/uploads\/2023\/01\/simple-custom-css-js-plugin-768x225.png 768w, https:\/\/www.dreamhost.com\/blog\/wp-content\/uploads\/2023\/01\/simple-custom-css-js-plugin-1536x450.png 1536w, https:\/\/www.dreamhost.com\/blog\/wp-content\/smush-webp\/2023\/01\/simple-custom-css-js-plugin-600x176.png.webp 600w, https:\/\/www.dreamhost.com\/blog\/wp-content\/smush-webp\/2023\/01\/simple-custom-css-js-plugin-1200x351.png.webp 1200w, https:\/\/www.dreamhost.com\/blog\/wp-content\/smush-webp\/2023\/01\/simple-custom-css-js-plugin-730x214.png.webp 730w, https:\/\/www.dreamhost.com\/blog\/wp-content\/smush-webp\/2023\/01\/simple-custom-css-js-plugin-1460x427.png.webp 1460w, https:\/\/www.dreamhost.com\/blog\/wp-content\/smush-webp\/2023\/01\/simple-custom-css-js-plugin-784x229.png.webp 784w, https:\/\/www.dreamhost.com\/blog\/wp-content\/smush-webp\/2023\/01\/simple-custom-css-js-plugin-1568x459.png.webp 1568w, https:\/\/www.dreamhost.com\/blog\/wp-content\/smush-webp\/2023\/01\/simple-custom-css-js-plugin-877x257.png.webp 877w, https:\/\/www.dreamhost.com\/blog\/wp-content\/smush-webp\/2023\/01\/simple-custom-css-js-plugin-1754x513.png.webp 1754w\" data-sizes=\"(max-width: 1999px) 100vw, 1999px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 1999px; --smush-placeholder-aspect-ratio: 1999\/585;\" \/><\/figure>\n<\/div>\n\n\n<p class=\"wp-block-paragraph\">Once active, go to the plugin\u2019s dashboard and choose <i>Add HTML Code<\/i>:<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter\"><img decoding=\"async\" width=\"1999\" height=\"573\" data-src=\"https:\/\/www.dreamhost.com\/blog\/wp-content\/smush-webp\/2023\/01\/add-html-code-with-simple-custom-css-and-js-plugin.png.webp\" alt=\"Add HTML code with the Simple Custom CSS and JS plugin\" class=\"wp-image-38483 lazyload\" data-srcset=\"https:\/\/www.dreamhost.com\/blog\/wp-content\/smush-webp\/2023\/01\/add-html-code-with-simple-custom-css-and-js-plugin.png.webp 1999w, https:\/\/www.dreamhost.com\/blog\/wp-content\/uploads\/2023\/01\/add-html-code-with-simple-custom-css-and-js-plugin-300x86.png 300w, https:\/\/www.dreamhost.com\/blog\/wp-content\/uploads\/2023\/01\/add-html-code-with-simple-custom-css-and-js-plugin-1024x294.png 1024w, https:\/\/www.dreamhost.com\/blog\/wp-content\/uploads\/2023\/01\/add-html-code-with-simple-custom-css-and-js-plugin-768x220.png 768w, https:\/\/www.dreamhost.com\/blog\/wp-content\/uploads\/2023\/01\/add-html-code-with-simple-custom-css-and-js-plugin-1536x440.png 1536w, https:\/\/www.dreamhost.com\/blog\/wp-content\/smush-webp\/2023\/01\/add-html-code-with-simple-custom-css-and-js-plugin-600x172.png.webp 600w, https:\/\/www.dreamhost.com\/blog\/wp-content\/smush-webp\/2023\/01\/add-html-code-with-simple-custom-css-and-js-plugin-1200x344.png.webp 1200w, https:\/\/www.dreamhost.com\/blog\/wp-content\/smush-webp\/2023\/01\/add-html-code-with-simple-custom-css-and-js-plugin-730x209.png.webp 730w, https:\/\/www.dreamhost.com\/blog\/wp-content\/smush-webp\/2023\/01\/add-html-code-with-simple-custom-css-and-js-plugin-1460x418.png.webp 1460w, https:\/\/www.dreamhost.com\/blog\/wp-content\/smush-webp\/2023\/01\/add-html-code-with-simple-custom-css-and-js-plugin-784x225.png.webp 784w, https:\/\/www.dreamhost.com\/blog\/wp-content\/smush-webp\/2023\/01\/add-html-code-with-simple-custom-css-and-js-plugin-1568x449.png.webp 1568w, https:\/\/www.dreamhost.com\/blog\/wp-content\/smush-webp\/2023\/01\/add-html-code-with-simple-custom-css-and-js-plugin-877x251.png.webp 877w, https:\/\/www.dreamhost.com\/blog\/wp-content\/smush-webp\/2023\/01\/add-html-code-with-simple-custom-css-and-js-plugin-1754x503.png.webp 1754w\" data-sizes=\"(max-width: 1999px) 100vw, 1999px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 1999px; --smush-placeholder-aspect-ratio: 1999\/573;\" \/><\/figure>\n<\/div>\n\n\n<p class=\"wp-block-paragraph\">You can give your code a title like \u201cAdds dotLottie Player\u201d. Then, paste the pinned script tag in the editor and click on <i>Publish<\/i>:<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter\"><img decoding=\"async\" width=\"1999\" height=\"662\" data-src=\"https:\/\/www.dreamhost.com\/blog\/wp-content\/smush-webp\/2023\/01\/add-lottie-players-to-wordpress-custom-html.png.webp\" alt=\"Add the Lottie Player to WordPress with custom HTML\" class=\"wp-image-38484 lazyload\" data-srcset=\"https:\/\/www.dreamhost.com\/blog\/wp-content\/smush-webp\/2023\/01\/add-lottie-players-to-wordpress-custom-html.png.webp 1999w, https:\/\/www.dreamhost.com\/blog\/wp-content\/uploads\/2023\/01\/add-lottie-players-to-wordpress-custom-html-300x99.png 300w, https:\/\/www.dreamhost.com\/blog\/wp-content\/uploads\/2023\/01\/add-lottie-players-to-wordpress-custom-html-1024x339.png 1024w, https:\/\/www.dreamhost.com\/blog\/wp-content\/uploads\/2023\/01\/add-lottie-players-to-wordpress-custom-html-768x254.png 768w, https:\/\/www.dreamhost.com\/blog\/wp-content\/uploads\/2023\/01\/add-lottie-players-to-wordpress-custom-html-1536x509.png 1536w, https:\/\/www.dreamhost.com\/blog\/wp-content\/smush-webp\/2023\/01\/add-lottie-players-to-wordpress-custom-html-600x199.png.webp 600w, https:\/\/www.dreamhost.com\/blog\/wp-content\/smush-webp\/2023\/01\/add-lottie-players-to-wordpress-custom-html-1200x397.png.webp 1200w, https:\/\/www.dreamhost.com\/blog\/wp-content\/smush-webp\/2023\/01\/add-lottie-players-to-wordpress-custom-html-730x242.png.webp 730w, https:\/\/www.dreamhost.com\/blog\/wp-content\/smush-webp\/2023\/01\/add-lottie-players-to-wordpress-custom-html-1460x484.png.webp 1460w, https:\/\/www.dreamhost.com\/blog\/wp-content\/smush-webp\/2023\/01\/add-lottie-players-to-wordpress-custom-html-784x260.png.webp 784w, https:\/\/www.dreamhost.com\/blog\/wp-content\/smush-webp\/2023\/01\/add-lottie-players-to-wordpress-custom-html-1568x519.png.webp 1568w, https:\/\/www.dreamhost.com\/blog\/wp-content\/smush-webp\/2023\/01\/add-lottie-players-to-wordpress-custom-html-877x290.png.webp 877w, https:\/\/www.dreamhost.com\/blog\/wp-content\/smush-webp\/2023\/01\/add-lottie-players-to-wordpress-custom-html-1754x581.png.webp 1754w\" data-sizes=\"(max-width: 1999px) 100vw, 1999px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 1999px; --smush-placeholder-aspect-ratio: 1999\/662;\" \/><\/figure>\n<\/div>\n\n\n<p class=\"wp-block-paragraph\">Now, return to the page where you inserted your HTML code. You should see your Lottie animation when you switch to the preview:<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter\"><img decoding=\"async\" width=\"1999\" height=\"846\" data-src=\"https:\/\/www.dreamhost.com\/blog\/wp-content\/smush-webp\/2023\/01\/lottie-animation-added-to-wordpress.png.webp\" alt=\"Lottie animation added to WordPress via HTML and JavaScript\" class=\"wp-image-38489 lazyload\" data-srcset=\"https:\/\/www.dreamhost.com\/blog\/wp-content\/smush-webp\/2023\/01\/lottie-animation-added-to-wordpress.png.webp 1999w, https:\/\/www.dreamhost.com\/blog\/wp-content\/uploads\/2023\/01\/lottie-animation-added-to-wordpress-300x127.png 300w, https:\/\/www.dreamhost.com\/blog\/wp-content\/uploads\/2023\/01\/lottie-animation-added-to-wordpress-1024x433.png 1024w, https:\/\/www.dreamhost.com\/blog\/wp-content\/uploads\/2023\/01\/lottie-animation-added-to-wordpress-768x325.png 768w, https:\/\/www.dreamhost.com\/blog\/wp-content\/uploads\/2023\/01\/lottie-animation-added-to-wordpress-1536x650.png 1536w, https:\/\/www.dreamhost.com\/blog\/wp-content\/smush-webp\/2023\/01\/lottie-animation-added-to-wordpress-600x254.png.webp 600w, https:\/\/www.dreamhost.com\/blog\/wp-content\/smush-webp\/2023\/01\/lottie-animation-added-to-wordpress-1200x508.png.webp 1200w, https:\/\/www.dreamhost.com\/blog\/wp-content\/smush-webp\/2023\/01\/lottie-animation-added-to-wordpress-730x309.png.webp 730w, https:\/\/www.dreamhost.com\/blog\/wp-content\/smush-webp\/2023\/01\/lottie-animation-added-to-wordpress-1460x618.png.webp 1460w, https:\/\/www.dreamhost.com\/blog\/wp-content\/smush-webp\/2023\/01\/lottie-animation-added-to-wordpress-784x332.png.webp 784w, https:\/\/www.dreamhost.com\/blog\/wp-content\/smush-webp\/2023\/01\/lottie-animation-added-to-wordpress-1568x664.png.webp 1568w, https:\/\/www.dreamhost.com\/blog\/wp-content\/smush-webp\/2023\/01\/lottie-animation-added-to-wordpress-877x371.png.webp 877w, https:\/\/www.dreamhost.com\/blog\/wp-content\/smush-webp\/2023\/01\/lottie-animation-added-to-wordpress-1754x742.png.webp 1754w\" data-sizes=\"(max-width: 1999px) 100vw, 1999px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 1999px; --smush-placeholder-aspect-ratio: 1999\/846;\" \/><\/figure>\n<\/div>\n\n\n<p class=\"wp-block-paragraph\">If the animation is too big or too small, adjust the values in the element\u2019s <span style=\"font-family: 'courier new', courier, monospace;\">style=&#8221;width: X; height: X&#8221;<\/span> attribute.<\/p>\n\n<h2 id=\"h-where-should-you-host-your-lottie-files\" class=\"wp-block-heading\"><b>Where should you host your Lottie files?<\/b><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">If you use a URL copied from LottieFiles, the animation is served from LottieFiles\u2019 servers rather than yours. (The plugin\u2019s Media Library option and the manual player can also use a self-hosted file.) That\u2019s convenient, but it makes your page depend on a third party: if the animation is removed from the library or the service has an outage, the animation on your page breaks with it.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">For full control, you can host the file yourself. Download the .json or .lottie file from LottieFiles, upload it to your own hosting (via SFTP, or through the WordPress Media Library; the <a href=\"https:\/\/wordpress.org\/plugins\/lottiefiles\/\" target=\"_blank\" rel=\"noopener\">LottieFiles plugin<\/a> lets you save and reuse Lottie JSON files there), and point the block or the player\u2019s <span style=\"font-family: 'courier new', courier, monospace;\">src<\/span> attribute at your own URL. Self-hosting removes the external dependency at the cost of a couple of extra steps.<\/p>\n\n\n\n<h2 id=\"h-how-to-create-your-own-lottie-animations\" class=\"wp-block-heading\"><b>How to create your own Lottie animations<\/b><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">You don\u2019t have to settle for premade animations, either. There are two main ways to make your own:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Lottie Creator<\/strong>: <a href=\"https:\/\/lottiefiles.com\/lottie-creator\" target=\"_blank\" rel=\"noopener\">LottieFiles\u2019 browser-based editor<\/a> builds Lottie and dotLottie animations with no After Effects required, and it\u2019s free to start. Its built-in AI assistant, Motion Copilot, can even generate an editable animation from a plain-text prompt.<\/li>\n\n\n\n<li><strong>Adobe After Effects<\/strong>: If you already design in After Effects, the <a href=\"https:\/\/lottiefiles.com\/plugins\/after-effects\" target=\"_blank\" rel=\"noopener\">LottieFiles for After Effects plugin<\/a> exports your compositions as Lottie or dotLottie files.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">Either way, you\u2019ll end up with a .json or .lottie file you can add to your site using any of the three methods above.<\/p>\n\n\n\n<h2 id=\"h-lottie-animation-faqs\" class=\"wp-block-heading\"><b>Lottie animation FAQs<\/b><\/h2>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-what-is-a-lottie-json-file\"><b>What is a Lottie JSON file?<\/b><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">A Lottie JSON file (.json) is a text file that describes a vector animation as data \u2014 shapes, colors, and keyframes \u2014 rather than video frames. A JavaScript player reads that data and renders the animation in the browser, which keeps files small and quality sharp at any scale.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-what-is-a-dotlottie-file\"><b>What is a dotLottie (.lottie) file?<\/b><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">A dotLottie file (.lottie) is a compressed container that bundles one or more Lottie animations and their assets into a single, smaller file. The LottieFiles WordPress plugin and the current dotLottie web player both support it alongside plain Lottie JSON.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-do-i-need-javascript-to-use-lottie-animations\"><b>Do I need JavaScript to use Lottie animations?<\/b><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Yes. A Lottie animation needs a JavaScript player to render in the browser. If you use the oEmbed method or the LottieFiles WordPress plugin, that player is loaded for you. Only the manual HTML method requires you to add the player script yourself.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-where-should-i-host-my-lottie-files\"><b>Where should I host my Lottie files?<\/b><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Links copied from LottieFiles point to LottieFiles\u2019 servers, which works fine for most sites. For full control, download the .json or .lottie file, upload it to your own hosting or WordPress Media Library, and point the player at your own URL.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-can-i-create-my-own-lottie-animations\"><b>Can I create my own Lottie animations?<\/b><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Yes. LottieFiles\u2019 browser-based Lottie Creator makes Lottie animations without After Effects (including AI-assisted generation with Motion Copilot), and the LottieFiles for After Effects plugin exports compositions as Lottie or dotLottie files.<\/p>\n\n\n\n<h2 id=\"h-add-lottie-animations-to-your-site-today\" class=\"wp-block-heading\"><b>Add Lottie animations to your site today<\/b><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Lottie animations are a lightweight way to add motion where it earns its place: loading states, interface feedback, and small illustrations that reflect your branding. Used sparingly, they give your pages polish without the file-size cost of video or GIFs.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">To recap, here are three ways to add <a href=\"https:\/\/lottiefiles.com\/\" target=\"_blank\" rel=\"noopener\">Lottie animations<\/a> to your site:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Add Lottie animations with oEmbed.<\/li>\n\n\n\n<li>Add Lottie animations using the <a href=\"https:\/\/wordpress.org\/plugins\/lottiefiles\/\" target=\"_blank\" rel=\"noopener\">LottieFiles<\/a> plugin.<\/li>\n\n\n\n<li>Add Lottie animations with HTML and JavaScript.<\/li>\n<\/ol>\n\n\n\n<p class=\"wp-block-paragraph\">Another way to set your website apart from the rest is by designing custom pages that are unique to your brand. At DreamHost, we can build you a site that\u2019s one-of-a-kind, <a href=\"https:\/\/www.dreamhost.com\/blog\/how-to-optimize-your-site-for-mobile\/\" target=\"_blank\" rel=\"noopener\">mobile-friendly<\/a>, and optimized for search engines. Check out <a href=\"https:\/\/www.dreamhost.com\/pro-services\/design\/\" target=\"_blank\" rel=\"noopener\">our web design plans<\/a> today!<\/p>\n\n\n\n\n\n<div\n\tclass=\"article-cta-shared article-cta-small\"\n>\n    <div class=\"tr-img-wrap-outer jsLoading\"><img decoding=\"async\" class=\"js-img-lazy \" src=\"https:\/\/www.dreamhost.com\/blog\/wp-content\/themes\/blog2018\/assets\/img\/lazy-loading-transparent.webp\" data-srcset=\"https:\/\/www.dreamhost.com\/blog\/wp-content\/themes\/blog2018\/assets\/img\/article-small-ad-cta-placeholder.webp 1x, https:\/\/www.dreamhost.com\/blog\/wp-content\/themes\/blog2018\/assets\/img\/article-small-ad-cta-placeholder-x2.webp 2x\"  alt=\"Ad background image\" \/><\/div>\n\n\n\n\n  <div class=\"content-btm\">\n    <h2\n      class=\"h2--md\"\n    >\n      Get a Beautiful Website You\u2019re Proud Of\n    <\/h2>\n    <p\n      class=\"p--md\"\n    >\n      Our designers will create a gorgeous website from scratch to perfectly match your brand.\n    <\/p>\n\n            <a\n            href=\"https:\/\/www.dreamhost.com\/pro-services\/design\/\"\n                        class=\"btn btn--white-outline btn--sm btn--round\"\n                                    target=\"_blank\"\n            rel=\"noopener noreferrer\"\n            >\n                            Learn More                    <\/a>\n\n  <\/div>\n<\/div>\n\n\n","protected":false},"excerpt":{"rendered":"<p>There are three simple ways to add Lottie animations to your WordPress site: paste an animation\u2019s oEmbed URL into an Embed block, use the free LottieFiles plugin for Gutenberg, or embed one manually with HTML and JavaScript. The first two take just a few minutes and require no code at all. Lottie animations work well [&hellip;]<\/p>\n","protected":false},"author":1058,"featured_media":86827,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"_yoast_wpseo_opengraph-title":"Lottie Web Animations: Add Them to WordPress - DreamHost","_yoast_wpseo_opengraph-description":"Lottie web animations add lightweight, scalable motion to your site \u2014 learn three ways to add them in WordPress, plus hosting and creation tips.","_yoast_wpseo_twitter-title":"Lottie Web Animations: Add Them to WordPress - DreamHost","_yoast_wpseo_twitter-description":"Lottie web animations add lightweight, scalable motion to your site \u2014 learn three ways to add them in WordPress, plus hosting and creation tips.","toc_headlines":"[[\"h-what-is-a-lottie-animation\",\"What is a Lottie animation?\"],[\"h-the-benefits-of-adding-lottie-animations-to-your-site\",\"The benefits of adding Lottie animations to your site\"],[\"h-how-to-add-lottie-animations-to-your-site-3-ways\",\"How to add Lottie animations to your site (3 ways)\"],[\"h-where-should-you-host-your-lottie-files\",\"Where should you host your Lottie files?\"],[\"h-how-to-create-your-own-lottie-animations\",\"How to create your own Lottie animations\"],[\"h-lottie-animation-faqs\",\"Lottie animation FAQs\"],[\"h-add-lottie-animations-to-your-site-today\",\"Add Lottie animations to your site today\"]]","hide_toc":false,"show_updated_at":"1","footnotes":""},"categories":[13129,12852,696],"tags":[],"class_list":["post-38481","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-developer-central","category-website-design","category-wordpress"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v28.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Lottie Web Animations: Add Them to WordPress - DreamHost<\/title>\n<meta name=\"description\" content=\"Lottie web animations add lightweight, scalable motion to your site \u2014 learn three ways to add them in WordPress, plus hosting and creation tips.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.dreamhost.com\/blog\/add-lottie-animations\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Lottie Web Animations: Add Them to WordPress - DreamHost\" \/>\n<meta property=\"og:description\" content=\"Lottie web animations add lightweight, scalable motion to your site \u2014 learn three ways to add them in WordPress, plus hosting and creation tips.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.dreamhost.com\/blog\/add-lottie-animations\/\" \/>\n<meta property=\"og:site_name\" content=\"DreamHost Blog\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/DreamHost\/\" \/>\n<meta property=\"article:published_time\" content=\"2023-01-04T15:00:18+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2026-08-07T23:24:27+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.dreamhost.com\/blog\/wp-content\/uploads\/2023\/01\/Adding-Lottie-Animations-EN.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1200\" \/>\n\t<meta property=\"og:image:height\" content=\"628\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Ian Hernandez\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:title\" content=\"Lottie Web Animations: Add Them to WordPress - DreamHost\" \/>\n<meta name=\"twitter:description\" content=\"Lottie web animations add lightweight, scalable motion to your site \u2014 learn three ways to add them in WordPress, plus hosting and creation tips.\" \/>\n<meta name=\"twitter:creator\" content=\"@dreamhost\" \/>\n<meta name=\"twitter:site\" content=\"@dreamhost\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Ian Hernandez\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"10 minutes\" \/>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Lottie Web Animations: Add Them to WordPress - DreamHost","description":"Lottie web animations add lightweight, scalable motion to your site \u2014 learn three ways to add them in WordPress, plus hosting and creation tips.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.dreamhost.com\/blog\/add-lottie-animations\/","og_locale":"en_US","og_type":"article","og_title":"Lottie Web Animations: Add Them to WordPress - DreamHost","og_description":"Lottie web animations add lightweight, scalable motion to your site \u2014 learn three ways to add them in WordPress, plus hosting and creation tips.","og_url":"https:\/\/www.dreamhost.com\/blog\/add-lottie-animations\/","og_site_name":"DreamHost Blog","article_publisher":"https:\/\/www.facebook.com\/DreamHost\/","article_published_time":"2023-01-04T15:00:18+00:00","article_modified_time":"2026-08-07T23:24:27+00:00","og_image":[{"width":1200,"height":628,"url":"https:\/\/www.dreamhost.com\/blog\/wp-content\/uploads\/2023\/01\/Adding-Lottie-Animations-EN.jpg","type":"image\/jpeg"}],"author":"Ian Hernandez","twitter_card":"summary_large_image","twitter_title":"Lottie Web Animations: Add Them to WordPress - DreamHost","twitter_description":"Lottie web animations add lightweight, scalable motion to your site \u2014 learn three ways to add them in WordPress, plus hosting and creation tips.","twitter_creator":"@dreamhost","twitter_site":"@dreamhost","twitter_misc":{"Written by":"Ian Hernandez","Est. reading time":"10 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.dreamhost.com\/blog\/add-lottie-animations\/#article","isPartOf":{"@id":"https:\/\/www.dreamhost.com\/blog\/add-lottie-animations\/"},"author":{"name":"Ian Hernandez","@id":"https:\/\/www.dreamhost.com\/blog\/#\/schema\/person\/6b2312bf0bff4ec04f50c319af67d0f7"},"headline":"How to Add Lottie Animations to Your Site","datePublished":"2023-01-04T15:00:18+00:00","dateModified":"2026-08-07T23:24:27+00:00","mainEntityOfPage":{"@id":"https:\/\/www.dreamhost.com\/blog\/add-lottie-animations\/"},"wordCount":1919,"publisher":{"@id":"https:\/\/www.dreamhost.com\/blog\/#organization"},"image":{"@id":"https:\/\/www.dreamhost.com\/blog\/add-lottie-animations\/#primaryimage"},"thumbnailUrl":"https:\/\/www.dreamhost.com\/blog\/wp-content\/uploads\/2026\/08\/blog-hero-add-lottie-animations-dreamops-c6a443fa5fff10377a2f97ba.webp","articleSection":["Developer Central","Website Design","WordPress"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/www.dreamhost.com\/blog\/add-lottie-animations\/","url":"https:\/\/www.dreamhost.com\/blog\/add-lottie-animations\/","name":"Lottie Web Animations: Add Them to WordPress - DreamHost","isPartOf":{"@id":"https:\/\/www.dreamhost.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.dreamhost.com\/blog\/add-lottie-animations\/#primaryimage"},"image":{"@id":"https:\/\/www.dreamhost.com\/blog\/add-lottie-animations\/#primaryimage"},"thumbnailUrl":"https:\/\/www.dreamhost.com\/blog\/wp-content\/uploads\/2026\/08\/blog-hero-add-lottie-animations-dreamops-c6a443fa5fff10377a2f97ba.webp","datePublished":"2023-01-04T15:00:18+00:00","dateModified":"2026-08-07T23:24:27+00:00","description":"Lottie web animations add lightweight, scalable motion to your site \u2014 learn three ways to add them in WordPress, plus hosting and creation tips.","breadcrumb":{"@id":"https:\/\/www.dreamhost.com\/blog\/add-lottie-animations\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.dreamhost.com\/blog\/add-lottie-animations\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.dreamhost.com\/blog\/add-lottie-animations\/#primaryimage","url":"https:\/\/www.dreamhost.com\/blog\/wp-content\/uploads\/2026\/08\/blog-hero-add-lottie-animations-dreamops-c6a443fa5fff10377a2f97ba.webp","contentUrl":"https:\/\/www.dreamhost.com\/blog\/wp-content\/uploads\/2026\/08\/blog-hero-add-lottie-animations-dreamops-c6a443fa5fff10377a2f97ba.webp","width":1536,"height":1024},{"@type":"BreadcrumbList","@id":"https:\/\/www.dreamhost.com\/blog\/add-lottie-animations\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.dreamhost.com\/blog\/"},{"@type":"ListItem","position":2,"name":"How to Add Lottie Animations to Your Site"}]},{"@type":"WebSite","@id":"https:\/\/www.dreamhost.com\/blog\/#website","url":"https:\/\/www.dreamhost.com\/blog\/","name":"DreamHost Blog","description":"","publisher":{"@id":"https:\/\/www.dreamhost.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.dreamhost.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.dreamhost.com\/blog\/#organization","name":"DreamHost","url":"https:\/\/www.dreamhost.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.dreamhost.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/dhblog.dream.press\/blog\/wp-content\/uploads\/2019\/01\/dh_logo-blue-2.png","contentUrl":"https:\/\/dhblog.dream.press\/blog\/wp-content\/uploads\/2019\/01\/dh_logo-blue-2.png","width":1200,"height":168,"caption":"DreamHost"},"image":{"@id":"https:\/\/www.dreamhost.com\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/DreamHost\/","https:\/\/x.com\/dreamhost","https:\/\/www.instagram.com\/dreamhost\/","https:\/\/www.linkedin.com\/company\/dreamhost\/","https:\/\/www.youtube.com\/user\/dreamhostusa"]},{"@type":"Person","@id":"https:\/\/www.dreamhost.com\/blog\/#\/schema\/person\/6b2312bf0bff4ec04f50c319af67d0f7","name":"Ian Hernandez","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.dreamhost.com\/blog\/wp-content\/uploads\/2022\/04\/ian-hernandez-dreamhost-150x150.png","url":"https:\/\/www.dreamhost.com\/blog\/wp-content\/uploads\/2022\/04\/ian-hernandez-dreamhost-150x150.png","contentUrl":"https:\/\/www.dreamhost.com\/blog\/wp-content\/uploads\/2022\/04\/ian-hernandez-dreamhost-150x150.png","caption":"Ian Hernandez"},"description":"Ian is a Product Designer based in Los Angeles, California. He is responsible for driving brand and product design at DreamHost, developing and maintaining our internal design system, and writing frontend code when he can. In his free time, he enjoys walking his dog, learning history, and discovering new music online and irl. Connect with him on LinkedIn: https:\/\/www.linkedin.com\/in\/ianhernandez23\/","url":"https:\/\/www.dreamhost.com\/blog\/author\/ianh\/"}]}},"lang":"en","translations":{"en":38481,"de":57473,"pt":57470,"es":38507,"pl":51785,"uk":57457,"ru":57494,"it":67915,"fr":69417,"nl":69439},"pll_sync_post":{},"_links":{"self":[{"href":"https:\/\/www.dreamhost.com\/blog\/wp-json\/wp\/v2\/posts\/38481","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.dreamhost.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.dreamhost.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.dreamhost.com\/blog\/wp-json\/wp\/v2\/users\/1058"}],"version-history":[{"count":1,"href":"https:\/\/www.dreamhost.com\/blog\/wp-json\/wp\/v2\/posts\/38481\/revisions"}],"predecessor-version":[{"id":86828,"href":"https:\/\/www.dreamhost.com\/blog\/wp-json\/wp\/v2\/posts\/38481\/revisions\/86828"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.dreamhost.com\/blog\/wp-json\/wp\/v2\/media\/86827"}],"wp:attachment":[{"href":"https:\/\/www.dreamhost.com\/blog\/wp-json\/wp\/v2\/media?parent=38481"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.dreamhost.com\/blog\/wp-json\/wp\/v2\/categories?post=38481"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.dreamhost.com\/blog\/wp-json\/wp\/v2\/tags?post=38481"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}