What is MIME type "image/x-hvif"?

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

image/x-hvif is the MIME type for the Haiku Vector Icon Format.
It is used to display vector icons in the Haiku operating system. The format uses mathematical curves and lines instead of pixels. This means icons can scale to any size without losing quality.


It works with the file extension HVIF.
Learn more about vector icons on the Haiku OS website.

Associated file extensions

Usage Examples

HTTP Header

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


    Content-Type: image/x-hvif    
  

HTML

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


    <a href="file.dat" type="image/x-hvif">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', 'image/x-hvif');    
      res.end('Content here');    
    }).listen(3000);    
  

Associated file extensions

FAQs

Can I use image/x-hvif files on a standard website?

No, most modern web browsers like Chrome, Firefox, and Edge do not natively support the HVIF format. While HVIF is incredibly small and efficient, web developers should use image/svg+xml (SVG) for vector graphics to ensure icons display correctly across all devices and browsers.

How do I configure Apache to serve .hvif files?

Since this is a non-standard MIME type, you must explicitly define it in your .htaccess file or main configuration. Add the line AddType image/x-hvif .hvif to ensure the server sends the correct headers rather than defaulting to a generic binary stream.

What is the difference between HVIF and SVG?

Both are vector formats, but HVIF is optimized for extreme compactness (often under 500 bytes) specifically for the Haiku OS. SVG is an XML-based web standard that is text-readable and universally supported but generally results in larger file sizes. For general web use, SVG is the preferred choice.

How do I open an .hvif file on Windows or macOS?

You generally cannot open these files natively on Windows or macOS without third-party tools. Because .hvif is specific to Haiku OS, the best way to view or edit them is by running Haiku in a virtual machine or using specific conversion libraries to export the file to PNG or SVG.

What does the "x-" prefix mean in image/x-hvif?

The x- prefix indicates that the MIME type is non-standard or experimental and not part of the core IANA registry. It signals to software that the format is proprietary or community-defined, in this case, specific to the Haiku operating system ecosystem.

Why is my server downloading .hvif files instead of displaying them?

This usually happens if the server sends the file as application/octet-stream because it doesn't recognize the extension. To fix this, update your server's MIME configuration (e.g., in Nginx's mime.types) to map the extension .hvif to image/x-hvif.

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.