Image MIME Reference
PJPEG
Progressive JPEG (Legacy IE Alias)
image/pjpeg
VS
X Bitmap (Legacy MIME Alias)
image/x-xbm
XBM
A complete technical comparison of Progressive JPEG (Legacy IE Alias) and X Bitmap (Legacy MIME Alias) — covering compression, feature support, browser compatibility, magic bytes, and when to choose each format.
PJPEG wins on browser support
Feature Support
| Feature | PJPEG | XBM |
|---|---|---|
| Transparency (Alpha) | ✕ No | Yes |
| Animation Support | ✕ No | ✕ No |
| Progressive Loading | Yes | ✕ No |
| HDR Support | ✕ No | ✕ No |
| EXIF Metadata | Yes | ✕ No |
| ICC Color Profile | Yes | ✕ No |
Progressive JPEG (Legacy IE Alias)
image/pjpeg
Extension
.jpeg.jpg.pjpeg.pjp.jfif
Container
JPEG (ISO/IEC 10918-1)
Compression
Lossy (DCT)
Algorithm
Discrete Cosine Transform (DCT)
Color Depth
8-bit, 12-bit
Developed by
Joint Photographic Experts Group / Microsoft (Alias)
Released
1992
Magic Bytes
FF D8 FF E0 (JFIF) / FF D8 FF E1 (Exif)
X Bitmap (Legacy MIME Alias)
image/x-xbm
Extension
.xbm
Container
C Source Code Header (.h)
Compression
Uncompressed (Source Code)
Algorithm
None
Color Depth
1-bit (Monochrome)
Developed by
MIT / X Consortium (X Window System)
Released
1988
Magic Bytes
23 64 65 66 69 6e 65 (ASCII '#define')
Browser Support Comparison
| Browser | PJPEG | XBM |
|---|---|---|
|
|
✓ All
|
✕ |
|
|
✓ All
|
✕ |
|
|
✓ All
|
✕ |
|
|
✓ All
|
✕ |
|
|
✓
|
✓
|
PJPEG
PJPEG Strengths
- Progressive JPEGs (which this MIME type attempted to describe) provide excellent perceived loading speeds on slow connections by rendering a low-resolution preview first
- Files sent with this MIME type are fully backwards compatible with any standard JPEG decoder
Limitations
- It is a non-standard MIME type that violates IANA specifications
- Causes strict file upload validation scripts to fail if not explicitly whitelisted or mapped
- Creates unnecessary confusion, as the official image/jpeg MIME type already fully encompasses progressive encoding
XBM
XBM Strengths
- Can be compiled directly into C or C++ source code without needing an external file loader or binary asset manager
- Human-readable structure allows developers to inspect, edit, or hand-craft tiny icons directly within a text editor
- Extremely predictable and lightweight for 1-bit hardware displays and embedded systems
Limitations
- Strictly limited to 1-bit monochrome (black and white) graphics with no gray or color support
- Text-based C syntax creates massive file bloat compared to binary 1-bit formats like PBM
- Completely deprecated in modern web browsers and desktop GUI frameworks
When to choose which format
PJPEG
Use PJPEG when…
- Legacy Internet Explorer File Uploads
- Progressive Image Rendering (Historical context)
XBM
Use XBM when…
- X Window System (X11) Cursors and Icons
- Embedded C/C++ Firmware UI Assets
- Early 1990s Unix Web Graphics