devkult_
tools29converters34
home/mime/.bmp

.bmp MIME type

Bitmap imageimages

image/bmp

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

MIME typeimage/bmp
Extensions.bmp
Content-Typeimage/bmp
Compress in transit?Yes — enable gzip or Brotli
File signature42 4D (BM)

Good to know

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

Serve .bmp files with the right type

The response header to send:

Content-Type: image/bmp

Most servers pick the type from the file extension. If yours sends the wrong one, map it explicitly:

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">

Check it

See what a server sends for a file, and what type a local file really is by its contents:

curl -sI https://example.com/file.bmp | grep -i '^content-type:'
file --mime-type file.bmp

Frequently asked questions

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

Headers that go with it: Content-Type · Content-Disposition · X-Content-Type-Options