BMP MIME Type
image/bmp files contain, how to identify and open them, and how Poly previews, indexes, and reads BMP images. MIME type details for image/bmp
In active use| MIME type | image/bmp |
|---|---|
| Extensions | .bmp.dib |
| Magic number | 42 4D |
| First standardized | 1980s |
| Created by | Microsoft Corporation and IBM Corporation |
| Browser support | Chrome, Edge, Firefox, Opera, Safari |
| Example applications | Adobe Photoshop, Microsoft Paint |
| Poly support | Yes. Poly recognizes image/bmp and .bmp files, decodes their pixels, extracts dimensions, and generates thumbnails. The registered .dib extension is not inferred from its filename. |
| Indexed by Poly | Yes. BMPs are indexed by filename, image dimensions, available EXIF metadata, and visual similarity. Text in the pixels is not OCR'd. |
| Preview in Poly | Yes. Decodable BMP files open in Poly's image viewer through generated previews. |
| Poly agent | Yes, after preview generation. The Poly agent reads the rendered thumbnail, but cannot fall back to raw BMP bytes while a preview is unavailable. |
What does image/bmp mean?
The image/bmp media type identifies a Windows Bitmap, usually called a BMP file. BMP stores one raster image: a rectangular grid of pixels rather than shapes, paths, or drawing commands. The IANA registration associates it with both .bmp and .dib files.1
Most standalone BMP files begin with the bytes 42 4D, the ASCII letters BM. The following little-endian field records the file size. A file with a .bmp suffix but a different signature may be mislabeled or damaged, so checking both the media type and header is safer than trusting the name alone.1
image/bmp.How a BMP file is organized
A standard BMP file starts with a BITMAPFILEHEADER, followed by a bitmap information header such as BITMAPINFOHEADER, BITMAPV4HEADER, or BITMAPV5HEADER. Depending on the variant, a color table may follow. Pixel data comes after those structures, with optional profile data at the end.23
The information header describes dimensions, bit depth, compression, resolution, and the number of colors. Indexed-color images refer to entries in a palette. Many full-color BMPs instead store pixel components directly. Rows are commonly arranged from the bottom of the image upward, although top-down BMPs also exist.2
BMP is a family of related layouts, not one rigid pixel encoding. Header generations added larger fields, color masks, color-space data, ICC profiles, and compression choices over time. That flexibility also creates compatibility traps: a decoder may open an ordinary 24-bit BMP but reject a less common compressed or high-bit-depth variant.
| Property | Common BMP behavior | Practical consequence |
|---|---|---|
| Pixel storage | Often uncompressed RGB | Simple to decode, but usually large |
| Scanline order | Commonly bottom-up | A naive reader can display the image upside down |
| Row layout | Rows are padded to a four-byte boundary | File size is not always exactly width × height × bytes per pixel |
| Color | Direct color or a palette | Bit depth and header variant matter for compatibility |
| Compression | Uncompressed and several compressed modes exist | Support for unusual modes varies by decoder |
Where BMP came from
Microsoft and IBM developed BMP in the 1980s for applications and operating systems that needed to map raster graphics efficiently onto the memory of machines such as the Intel 80286. The format evolved from 16-bit to 32-bit structures and later gained color spaces, profiles, and more compression options. Microsoft had publicly documented it by the Windows 3.1 SDK in 1992.3
The standards-tree media type image/bmp arrived much later. RFC 7903 documented the registration in September 2016, and IANA now lists that RFC as the registration's reference.13
BMP remains useful for old Windows assets, simple interchange with software that expects device-independent bitmaps, and debugging pixel output. PNG and JPEG displaced it for most interchange because an uncompressed BMP can be much larger.1
How to open a BMP file
Chrome, Edge, Firefox, Opera, and Safari can display ordinary BMP images. Browser support for uncommon BMP encodings is less dependable, so a successful test with one file does not prove that every BMP variant will render.4
For viewing or editing:
- Microsoft Paint is the format's familiar Windows-native editor.
- Adobe Photoshop imports and exports BMP and exposes options for bit depth and row order.5
- A current web browser is convenient for a quick check of a conventional file.
If an application rejects the image, verify the 42 4D signature and try a dedicated image editor before assuming the pixels are lost. A .dib file may belong to the same registered media type, but software often treats DIB data and standalone .bmp files differently.
Support in Poly
Poly has format-specific support for BMP. Its MIME table recognizes image/bmp, maps .bmp filenames to that type, and sends BMP data through the image decoder. Successful decodes receive dimensions and a set of WebP thumbnails, which the image viewer uses for display.
Those previews also power visual features. Poly creates a visual embedding from a generated thumbnail, so a BMP can participate in search by file and search by color. The filename, dimensions, and any metadata the general image parser can read are indexed too. Plain images are not OCR'd, so words visible inside a BMP do not become searchable text.
The Poly agent reads the rendered image through its generated thumbnail. There is one timing limitation: raw BMP is not one of the formats the agent can inline as a fallback. If thumbnail generation has not finished, retry after indexing completes.
.bmp, but not the registered .dib extension. A .dib upload may need its image/bmp type supplied or its extension changed to .bmp before it follows the expected image pipeline.Should BMP be used on the web?
Usually not. Browser support is broad, but the common uncompressed representation wastes bandwidth compared with PNG, WebP, AVIF, or JPEG. MDN recommends avoiding BMP for ordinary website content because more efficient choices are widely available.4
Choose the replacement based on the image:
- PNG for a lossless screenshot, diagram, pixel-art image, or transparency.
- JPEG for a photograph where a smaller lossy file is acceptable.
- WebP or AVIF for modern web delivery when you can test the target environment.
- TIFF when a print, scanning, or archival workflow specifically calls for it.
Converting an uncompressed BMP to PNG is lossless at the pixel level and will often reduce its size substantially. Converting to JPEG can be much smaller for a photograph, but it discards detail. Conversion also may omit a BMP color profile or interpret a rarely used alpha layout differently, so compare the result before deleting the source.
How do DIB and BMP files differ?
They are closely related. IANA registers both .bmp and .dib for image/bmp, and both names refer to Windows device-independent bitmap data.1 In practice, .bmp most often denotes a standalone file with the BITMAPFILEHEADER, while DIB structures are also used inside Windows APIs, resources, and other container formats. That context can affect which header an application expects.
Renaming a .dib file to .bmp does not add a missing file header or repair an unsupported encoding. If a renamed file still fails, use software that understands its original DIB layout and export a conventional BMP or PNG.
Security and interoperability
BMP does not provide executable content, integrity checking, or privacy controls. Its IANA registration notes that BMP can encapsulate JPEG or PNG data, so risks in those decoders can apply when such compression modes are used.1
Treat untrusted images as parser input. Keep image libraries updated, cap decoded dimensions and memory use, and reject inconsistent offsets or lengths. A small compressed file can still claim enormous dimensions, while a truncated file may point pixel data outside its actual byte range.
Footnotes
- Internet Assigned Numbers Authority. image/bmp Media Type Registration. ↩ ↩2 ↩3 ↩4 ↩5 ↩6
- Microsoft. Bitmap Storage. Windows App Development documentation. ↩ ↩2
- Leonard, S. RFC 7903: Windows Image Media Types. Internet Engineering Task Force, September 2016. ↩ ↩2 ↩3
- MDN Web Docs. Image File Type and Format Guide: BMP. ↩ ↩2
- Adobe. Save Files in Graphics Formats: BMP. ↩