# .bmp MIME Type: image/bmp

> Uncompressed Windows bitmaps — large files, rarely appropriate on the web.

- MIME type: `image/bmp`
- Extensions: .bmp
- Content-Type header: `image/bmp`
- Compress in transit: yes
- File signature: `42 4D`

## Good to know

- Convert to PNG for lossless storage; it's typically a fraction of the size.

## Server configuration

### nginx (inside the types block in mime.types)

```
image/bmp bmp;
```

### Apache (.htaccess or server config)

```
AddType image/bmp .bmp
```

### Express

```
res.set("Content-Type", "image/bmp");
```

### Python

```
import mimetypes

mimetypes.add_type("image/bmp", ".bmp")
```

### HTML file input

```
<input type="file" accept=".bmp,image/bmp">
```

## FAQ

### What is the MIME type for .bmp files?

`image/bmp`.

### What Content-Type header should a .bmp file be served with?

`Content-Type: image/bmp`. It compresses well, so let the server apply gzip or Brotli.

### How can I tell if a file is really a .bmp?

Check its bytes rather than the extension: BMP files start with `42 4D` (`BM`). On the command line, `file --mime-type name.bmp` does this for you.

## Related types

- [.png — image/png](https://www.devkult.com/mime/png.md)
- [.tiff — image/tiff](https://www.devkult.com/mime/tiff.md)

Open the interactive page: https://www.devkult.com/mime/bmp