Skip to main content
Free WebP to JPG
BPG

Better Portable Graphics MIME Type Reference

image/bpg Released 2014 · by Fabrice Bellard

Better Portable Graphics (BPG) is a modern, high-efficiency raster image format created in 2014 by programmer Fabrice Bellard. It wraps the intra-frame encoding of the HEVC (H.265) video compression standard, offering phenomenal compression ratios, native alpha channel transparency, and high color depths.

Professional & Broadcast Imaging Transparency Animation Production Ready

Technical Specifications

MIME Type
image/bpg
Extensions
.bpg
Container
Custom BPG Header
Compression
HEVC (H.265) Intra-frame & Lossless
Algorithms
HEVC (H.265)
Color Depth
8-bit (Per Channel), 10-bit (Per Channel), 12-bit (Per Channel), 14-bit (Per Channel)
Metadata
EXIF XMP ICC
Capabilities
Transparency
Animation
Progressive Loading
Alpha Channel
HDR Support
Official Specification
Aliases: image/x-bpg

Magic Bytes & HTTP Headers

File Signature (Magic Bytes)
42 50 47 FB
ASCII: BPG\xFB
HTTP Headers
Content-Type: image/bpg
HTML Accept Attribute
accept="image/bpg, .bpg"

Browser Support Matrix

Browser Status Min Version
Chrome Chrome
Not Supported
Firefox Firefox
Not Supported
Safari Safari
Not Supported
Edge Edge
Not Supported
Internet Explorer Internet Explorer
Not Supported Legacy

Advantages & Limitations

Advantages
  • Exceptional compression efficiency that vastly outperforms standard JPEG at similar quality levels
  • Supports high bit depths (up to 14 bits per channel), lossless compression, and alpha channel transparency within a single format
  • The official JavaScript decoder allows the format to be rendered on standard HTML5 canvas elements
Limitations
  • HEVC (H.265) patent encumbrance prevented native adoption in major web browsers
  • Superseded conceptually by the open, royalty-free AVIF format
  • Encoding BPG files is computationally intensive and requires specialized command-line tools

Developer Code Snippets

import magic
print(magic.from_file('file.bpg', mime=True)) # Outputs 'image/bpg'
const FileType = require('file-type');
const type = await FileType.fromFile('file.bpg');
console.log(type.mime); // image/bpg
import "net/http"

mimeType := http.DetectContentType(fileBytes)
fmt.Println(mimeType) // Note: Standard net/http may default to application/octet-stream for BPG
$mime = mime_content_type('file.bpg');
echo $mime; // image/bpg

File Detection Steps

How to programmatically detect a image/bpg file by reading its raw bytes:

  1. 1 Check the first 4 bytes for the BPG signature (42 50 47 FB)
  2. 2 Include the official 'bpgdec.js' Javascript decoder library if serving via web, as standard HTML <img> tags will fail

Software Support

b
bpgview (Official Viewer)
I
ImageMagick
X
XnView
H
Honeyview

Free Online Tools for BPG

BPG Format Comparisons

Share & Embed

Markdown Badge
BPG Format Badge
[![BPG Format](https://freewebptojpg.com/mime/image/bpg/badge.svg)](https://freewebptojpg.com/mime/image/bpg)
Interactive iframe Widget
<iframe src="https://freewebptojpg.com/mime/image/bpg/embed" width="100%" height="280" style="border:1px solid #cbd5e1;border-radius:8px;" title="BPG Specs"></iframe>

JSON API

All data on this page is available as a free, open JSON API. Use it in your project, documentation, or tooling.

GET https://freewebptojpg.com/mime/image/bpg.json Open JSON
Free to use
No auth required
CORS enabled
Use from any domain
Cached 24h
Cache-Control headers set

Frequently Asked Questions

What is the magic byte for image/bpg?

BPG images contain a 4-byte magic signature at offset 0. The first four bytes are 42 50 47 FB in hex, corresponding to the ASCII string 'BPG' followed by the 0xFB byte.

Is image/bpg natively supported in web browsers?

No. Despite its technical advantages, BPG was never natively adopted by major web browsers due to the patent royalties associated with its underlying HEVC (H.265) compression. It requires a JavaScript polyfill to render on the web.

What is the difference between BPG and AVIF?

Both are next-generation image formats based on video codecs. BPG uses the proprietary HEVC (H.265) codec, while AVIF uses the open, royalty-free AV1 codec. AVIF eventually won the web standard war due to its open licensing model.

Related Formats

Share this format

Your Trusted Online Image Studio, Loved by Users Worldwide

Fast image processing with zero compromise on privacy. 100% confidential, client-side execution, and automated purging.

All uploads and conversions use military-grade 256-bit TLS encryption for guaranteed privacy in transit.

SSL SECURED 256-BIT ENCRYPTION

Strictly compliant with EU Regulation 2016/679. Zero user profiling, tracking, or non-essential cookies.

100% GDPR PRIVACY COMPLIANT

Zero persistent server storage. Conversions run client-side, and temporary files auto-purge permanently.

100% PRIVACY ZERO SERVER STORAGE

100% Private (Zero Data Retention)

How FreeWebPtoJPG guarantees bit-level privacy and zero storage for your photos

100% In-Memory RAM Processing

Image transformations occur inside ephemeral stream memory buffers. No intermediate files or database entries are ever written to disk.

Auto-Purge Cron (Max 60 Min)

Every job payload is automatically wiped within 60 minutes. You can also trigger immediate zero-latency hard purge using the "Delete Now" button.

Zero AI Model Training

Your personal, medical, legal, or commercial photos are never stored, indexed, or used to train generative AI systems or computer vision models.

Auditable Open Architecture

Our transcoding worker, batch stream handler, and automated cleanup daemon are transparently architected in Go with zero telemetry on file bytes.