What is MIME type "video/lottie+json"?

A MIME type is a string that tells browsers and other tools how to handle a particular kind of file.

The video/lottie+json MIME type signals an animation file that uses the Lottie format. It is stored as data in a JSON structure. This format lets programs render vector animations with small file sizes.


These animations work well in programs and websites. They load fast and can be controlled with code.



For more details, visit LottieFiles.

Associated file extensions

Usage Examples

HTTP Header

When serving content with this MIME type, set the Content-Type header:


    Content-Type: video/lottie+json    
  

HTML

In HTML, you can specify the MIME type in various elements:


    <a href="file.dat" type="video/lottie+json">Download file</a>    
  

Server-side (Node.js)

Setting the Content-Type header in Node.js:


    const http = require('http');    
    
    http.createServer((req, res) => {    
      res.setHeader('Content-Type', 'video/lottie+json');    
      res.end('Content here');    
    }).listen(3000);    
  

Associated file extensions

FAQs

What is the video/lottie+json MIME type used for?

The video/lottie+json MIME type is used to identify Lottie animation files. These files contain vector animation data stored in a JSON structure, allowing for high-quality, scalable animations that are significantly smaller than GIFs or video files.

Do web browsers support video/lottie+json natively?

No, web browsers do not render video/lottie+json files directly like they do with images or MP4 videos. To display these animations, developers must use a JavaScript library, such as lottie-web (Bodymovin) or a web component like <lottie-player>.

Should I use application/json or video/lottie+json for Lottie files?

While Lottie files are technically JSON text and often served as application/json, using video/lottie+json is semantically more accurate. It specifically tells the client that the file is a media animation rather than generic data, which can help with file handling and player integration.

How do I configure Apache to serve Lottie files correctly?

To ensure Apache serves Lottie files with the correct MIME type, add the following line to your .htaccess file or main configuration: AddType video/lottie+json .json .lot. This ensures browsers and players interpret the content as animation data.

How do I add video/lottie+json support to Nginx?

In Nginx, open your mime.types file (usually located in /etc/nginx/) and add the line video/lottie+json lot json; inside the types block. After saving, restart Nginx to apply the changes.

What is the .lot file extension?

The .lot extension is sometimes used to explicitly distinguish Lottie animation files from standard configuration files, which also use the .json extension. Using .lot combined with the video/lottie+json MIME type helps systems automatically recognize the file as an animation.

Are there security risks associated with video/lottie+json?

Since video/lottie+json files are text-based data rather than executable binaries, they are generally secure. However, because they are parsed by JavaScript libraries, developers should always keep their Lottie player libraries updated to prevent potential cross-site scripting (XSS) or parsing vulnerabilities.

General FAQ

What is a MIME type?

A MIME (Multipurpose Internet Mail Extensions) type is a standard that indicates the nature and format of a document, file, or assortment of bytes. MIME types are defined and standardized in IETF's RFC 6838.

MIME types are important because they help browsers and servers understand how to process a file. When a browser receives a file from a server, it uses the MIME type to determine how to display or handle the content, whether it's an image to display, a PDF to open in a viewer, or a video to play.

MIME types consist of a type and a subtype, separated by a slash (e.g., text/html, image/jpeg, application/pdf). Some MIME types also include optional parameters.

How do I find the MIME type for a file?

You can check the file extension or use a file identification tool such as file --mime-type on the command line. Many programming languages also provide libraries to detect MIME types.

Why are multiple MIME types listed for one extension?

Different applications and historical conventions may use alternative MIME identifiers for the same kind of file. Showing them all helps ensure compatibility across systems.