In the rapidly evolving landscape of digital technology, the efficiency of data storage and transmission is a cornerstone of user experience. As high-resolution displays become the standard for smartphones, laptops, and monitors, the demand for high-quality imagery has never been higher. However, high quality often comes at the cost of large file sizes, which can slow down website loading speeds and consume significant bandwidth. Enter BPG, or Better Portable Graphics.
BPG is a modern image format designed to replace the aging JPEG standard. Developed by the renowned programmer Fabrice Bellard—the mind behind FFmpeg and QEMU—BPG promises significantly higher compression ratios and better visual quality than its predecessors. This article explores the technical foundations of BPG, its advantages over traditional formats, the competitive landscape of image compression, and its practical applications in today’s tech ecosystem.

1. The Genesis of BPG: Why the Web Needed a New Standard
To understand what BPG is, one must first understand the limitations of the Joint Photographic Experts Group (JPEG) format. Created in 1992, JPEG has been the king of digital imagery for over three decades. While it was revolutionary for its time, it was designed for an era of dial-up internet and low-resolution screens. JPEG often struggles with “blocky” artifacts at high compression levels and lacks modern features like transparency and high bit depth.
The HEVC Foundation
BPG is not a completely “from scratch” invention; rather, it is based on a subset of the High Efficiency Video Coding (HEVC) standard, also known as H.265. HEVC was developed to succeed H.264 (AVC) to handle 4K and 8K video more efficiently. Fabrice Bellard recognized that the advanced intra-frame compression techniques used in HEVC video could be applied to static images. By stripping away the temporal (motion-based) aspects of the video codec, Bellard created a powerful static image format that leverages some of the most advanced compression algorithms in existence.
Addressing the Bandwidth Crisis
In the modern tech world, performance is measured in milliseconds. Large images are the primary cause of slow “Time to Interactive” (TTI) metrics on websites. Developers have long sought a format that could maintain professional-grade visual fidelity while slashing file sizes by 50% or more. BPG was introduced specifically to address this “bandwidth crisis,” offering a path forward that aligns with the needs of mobile-first indexing and global connectivity.
2. Technical Superiority: Why BPG Outperforms Traditional Formats
BPG is more than just a compression trick; it is a sophisticated container for visual data that supports a wide range of technical requirements that JPEG simply cannot meet. From professional photography to UI design, its technical specifications are designed for the next generation of hardware.
High Compression Efficiency
The most striking feature of BPG is its efficiency. In head-to-head comparisons, a BPG file is typically half the size of a JPEG file of equivalent visual quality. This is achieved through advanced mathematical models that predict pixel values more accurately, reducing the amount of redundant data that needs to be stored. This allows websites to serve high-definition hero images that load instantly, even on slower 3G or 4G networks.
Support for High Dynamic Range (HDR) and Bit Depth
Standard JPEGs are limited to 8 bits per color channel, which can result in “banding” in gradients (like a sunset). BPG, however, supports up to 14 bits per channel. This makes it an ideal format for High Dynamic Range (HDR) content. It allows for smoother transitions between colors and retains significantly more detail in the shadows and highlights of an image. For photographers and digital artists, this level of precision is essential for preserving the integrity of their work.
Alpha Channel and Metadata Integration
Unlike JPEG, BPG natively supports an alpha channel, allowing for varying levels of transparency. This makes it a viable competitor to PNG, particularly for complex UI elements and logos that require transparency but would be too large as a standard PNG-24 file. Furthermore, BPG supports various metadata types, including EXIF, ICC profiles, and XMP, ensuring that color management and copyright information remain intact throughout the distribution process.
3. BPG vs. The Competition: WebP, AVIF, and JPEG XL

While BPG offers clear technical advantages, it exists in a crowded market of “next-gen” image formats. To understand its place in the tech world, we must compare it to its primary rivals: Google’s WebP and the emerging AVIF.
BPG vs. Google’s WebP
WebP has gained significant traction because it is natively supported by the Chrome browser. While WebP is superior to JPEG, many benchmarks suggest that BPG offers better visual quality at very low bitrates. BPG tends to handle fine textures and edges more gracefully than WebP, which can sometimes produce a “smearing” effect. However, WebP’s advantage lies in its corporate backing and widespread browser integration, whereas BPG remains a more independent, specialized tool.
The Licensing Debate and AVIF
One of the primary hurdles for BPG is the licensing of the HEVC standard. Because HEVC is patented, using BPG in commercial software can sometimes involve complex royalty issues. This led to the creation of AVIF (AV1 Image File Format), which is based on the royalty-free AV1 video codec. AVIF provides compression performance similar to (and sometimes better than) BPG without the licensing headaches. As a result, many tech giants like Google, Netflix, and Apple have pivoted toward AVIF as the open-source future of web imagery.
The Browser Support Challenge
Currently, no major web browser (Chrome, Firefox, Safari, or Edge) supports BPG natively. This is largely due to the aforementioned patent concerns surrounding HEVC. In contrast, formats like WebP and AVIF have seen rapid adoption. To use BPG on a website today, developers must use a small JavaScript-based decoder that renders the BPG image in the browser. While this works effectively, it adds a layer of complexity that has prevented BPG from becoming the universal standard.
4. Practical Implementation: How to Use BPG in Modern Workflows
Despite the lack of native browser support, BPG remains a popular choice for specific technical applications, particularly in environments where file size is the absolute priority or where a custom viewer can be implemented.
Implementing BPG with JavaScript Decoders
For web developers who want to leverage BPG’s superior compression, the solution lies in the bpgdec.js library. By including this lightweight script on a page, the browser can decode .bpg files on the fly and display them in a <canvas> element. This is particularly useful for internal tools, private galleries, or data-heavy applications where the developer has control over the rendering environment.
Use Cases in App Development and Local Storage
Where BPG truly shines is in mobile application development and local storage. Because a developer can bundle a BPG decoder directly into an Android or iOS app, they can use BPG images to significantly reduce the app’s “install size.” For apps that rely on large libraries of static assets—such as educational apps, offline maps, or high-fidelity mobile games—switching from JPEG/PNG to BPG can save hundreds of megabytes of space on the user’s device.
Reducing CDN and Hosting Costs
For businesses dealing with massive scales of data, such as social media platforms or cloud storage providers, image compression isn’t just about speed; it’s about the bottom line. Reducing image file sizes by 50% can lead to a proportional decrease in Content Delivery Network (CDN) egress costs. Even if BPG requires a JavaScript decoder, the savings in bandwidth often outweigh the computational cost of the decoding process, making it a powerful tool for optimizing backend infrastructure.
5. The Future of Image Compression: Beyond BPG
The story of BPG is a testament to the incredible innovation occurring in the field of signal processing. While it may not have achieved the “household name” status of JPEG, the technologies it pioneered have set the stage for the future of digital media.
The Rise of AI-Driven Compression
We are currently entering an era where Artificial Intelligence (AI) and Machine Learning (ML) are being used to compress images. Neural networks can now “predict” what an image should look like, allowing for even more aggressive data reduction. While BPG relies on traditional mathematical algorithms, the next generation of codecs will likely combine BPG-style intra-frame prediction with AI upscaling, potentially making high-resolution imagery smaller than ever before.
Is There a Single “Winner”?
In the tech world, we often look for the “one format to rule them all.” However, the reality is more fragmented. JPEG will likely remain the “legacy” format for compatibility, WebP will serve as the “current” standard for the web, and BPG and AVIF will continue to push the boundaries of what is possible in terms of quality and efficiency. BPG’s legacy is its proof of concept: it showed the world that we didn’t have to settle for the limitations of 1990s technology.

Conclusion
Better Portable Graphics (BPG) represents a peak in algorithmic image compression. By repurposing the power of HEVC for static images, it offers a glimpse into a future where “high quality” and “small file size” are no longer mutually exclusive. While licensing issues and browser support remain significant hurdles, the technical brilliance of BPG continues to influence how developers and engineers think about data. In the quest for a faster, more beautiful internet, BPG stands as a vital milestone in the evolution of digital imagery.
aViewFromTheCave is a participant in the Amazon Services LLC Associates Program, an affiliate advertising program designed to provide a means for sites to earn advertising fees by advertising and linking to Amazon.com. Amazon, the Amazon logo, AmazonSupply, and the AmazonSupply logo are trademarks of Amazon.com, Inc. or its affiliates. As an Amazon Associate we earn affiliate commissions from qualifying purchases.