Image MIME Reference
APNG
Animated Portable Network Graphics
image/vnd.mozilla.apng
VS
Portable Network Graphics (Legacy MIME)
image/x-png
PNG
A complete technical comparison of Animated Portable Network Graphics and Portable Network Graphics (Legacy MIME) — covering compression, feature support, browser compatibility, magic bytes, and when to choose each format.
Equal browser support
Feature Support
| Feature | APNG | PNG |
|---|---|---|
| Transparency (Alpha) | Yes | Yes |
| Animation Support | Yes | ✕ No |
| Progressive Loading | Yes | Yes |
| HDR Support | ✕ No | Yes |
| EXIF Metadata | Yes | Yes |
| ICC Color Profile | Yes | Yes |
Animated Portable Network Graphics
image/vnd.mozilla.apng
Extension
.apng.png
Container
PNG Chunk Stream
Compression
Deflate (Lossless)
Algorithm
Deflate (zlib)
Color Depth
8-bit (Indexed), 24-bit (TrueColor), 32-bit (RGBA)
Developed by
Mozilla Corporation (Stuart Parmenter & Vladimir Vukićević)
Released
2004
Magic Bytes
89 50 4E 47 0D 0A 1A 0A
Portable Network Graphics (Legacy MIME)
image/x-png
Extension
.png
Container
PNG Chunk Structure (IHDR, IDAT, IEND)
Compression
Deflate (Lossless)
Algorithm
Deflate (LZ77)
Color Depth
1-bit to 16-bit (Grayscale), 8-bit (Indexed Palette), 24-bit (True Color), 32-bit (True Color with Alpha), 48-bit (High Color), 64-bit (High Color with Alpha)
Developed by
PNG Development Group
Released
1996
Magic Bytes
89 50 4E 47 0D 0A 1A 0A
Browser Support Comparison
| Browser | APNG | PNG |
|---|---|---|
|
|
✓ 59
|
✓ 1
|
|
|
✓ 3
|
✓ 1
|
|
|
✓ 8
|
✓ 1
|
|
|
✓ 79
|
✓ 12
|
|
|
✕ |
✓
|
APNG
APNG Strengths
- Supports 8-bit alpha transparency, completely solving the ugly 'white halo' problem inherent to GIFs
- Gracefully degrades; viewers that do not support APNG will render a perfectly valid, static PNG of the first frame
- Provides lossless compression that retains absolute pixel-perfect quality for UI elements and line art
Limitations
- Because it relies on lossless Deflate compression, file sizes for complex, video-like animations can be massive compared to lossy formats like WebP or AVIF
- Was initially rejected by the official PNG group, delaying its adoption for nearly a decade
- Lacks native hardware decoding acceleration, unlike video-based animated formats (like MP4 or WebM)
PNG
PNG Strengths
- The underlying format provides flawless, lossless compression and perfect 8-bit alpha channel transparency
- Universally supported by every modern operating system, image editor, and web browser
Limitations
- The 'image/x-png' string is an obsolete vendor quirk that forces backend developers to write redundant normalization logic in file upload scripts
- If left unnormalized, strict MIME validators or content security policies on modern systems may incorrectly reject valid PNG files
When to choose which format
APNG
Use APNG when…
- High-Quality Web Animations
- Stickers (Apple iMessage, LINE, Discord)
- UI Loaders with Alpha Transparency
- GIF Replacement
PNG
Use PNG when…
- Legacy Internet Explorer File Uploads
- Older ASP/PHP Web Applications
- Lossless Web Graphics