What is MIME type "image/x-win-bitmap"?

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

image/x-win-bitmap is a MIME type for bitmap data used in Windows cursor files. It tells a program that the file contains pixel data and extra metadata needed for displaying a pointer properly.
Files of this type often use the CUR extension, which is standard for Microsoft Windows cursor images.
For further details on cursor formats and their role in computing, see Wikipedia: Cursor (computing).

Associated file extensions

Usage Examples

HTTP Header

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


    Content-Type: image/x-win-bitmap    
  

HTML

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


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

Associated file extensions

FAQs

What type of file uses the image/x-win-bitmap MIME type?

The image/x-win-bitmap MIME type is primarily associated with Windows Cursor files, which typically have the .cur extension. These files contain a bitmap image along with specific metadata, such as the "hotspot" coordinates that define exactly where the click occurs relative to the image.

How do I use a .cur file on a website?

To use a custom cursor on a website, you apply it using the CSS cursor property. For example: cursor: url('custom.cur'), auto;. While browsers often detect the file format automatically, ensuring your server sends the correct MIME type can prevent loading errors.

Is image/x-win-bitmap the standard MIME type for cursors?

No, the x- prefix indicates that image/x-win-bitmap is a non-standard or experimental type. While often used for cur files to distinguish them from icons, the official IANA media type for Windows icon-based formats is often considered image/vnd.microsoft.icon.

How do I configure Apache to serve .cur files as image/x-win-bitmap?

You can map the extension to the MIME type in your .htaccess file or main configuration. Add the line: AddType image/x-win-bitmap .cur. This ensures that when a browser requests a cursor file, the server identifies it correctly.

What is the difference between a BMP file and an image/x-win-bitmap file?

A standard BMP (image/bmp) contains only pixel data, whereas an image/x-win-bitmap (CUR file) acts as a container. It holds the bitmap headers plus a hotspot definition (X and Y coordinates), which is essential for the operating system to know which pixel triggers a click.

Why isn't my custom cursor displaying in the browser?

Browsers have strict limits on cursor file dimensions (usually 32x32 or 128x128 pixels) and file sizes. If the server sends the wrong MIME type or if the file is too large, the browser will ignore it and revert to the default pointer. Always verify your file is a valid binary CUR format, not just a renamed PNG.

Can I edit image/x-win-bitmap files in Photoshop?

Adobe Photoshop does not support .cur files natively out of the box. You usually need to install a third-party plugin to open and save Windows cursor files, or use specialized tools like IcoFX or GIMP to edit the bitmap data and define the hotspot.

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.