Portable Network Graphics (Legacy MIME)
image/x-png
Released 1996
· by PNG Development Group
The image/x-png MIME type is a legacy, non-standard alias for the Portable Network Graphics (PNG) format. It was historically generated by early versions of Microsoft Internet Explorer (specifically IE 4, 5, and 6) during file uploads before the official 'image/png' MIME type was fully standardized and adopted. The underlying file format is identical to a standard PNG—a robust, lossless, chunk-based image format supporting 8-bit alpha transparency. While modern web servers and browsers strictly use 'image/png', developers handling legacy systems or processing user file uploads must frequently account for 'image/x-png' to prevent unexpected validation failures.
Technical Specifications
.png
Deflate (LZ77)
image/png
Magic Bytes & HTTP Headers
\x89PNG\r\n\x1A\n
Browser Support Matrix
| Browser | Status | Min Version |
|---|---|---|
|
|
Supported | 1 |
|
|
Supported | 1 |
|
|
Supported | 1 |
|
|
Supported | 12 |
|
|
Supported | Legacy |
Advantages & Limitations
- 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
- 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
Developer Code Snippets
File Detection Steps
How to programmatically detect a image/x-png
file by reading its raw bytes:
- 1 Because the file is a standard PNG, check the first 8 bytes for the universal PNG signature (Hex: 89 50 4E 47 0D 0A 1A 0A).
- 2 When evaluating MIME types from HTTP multipart form uploads (e.g., $_FILES in PHP), map 'image/x-png' explicitly to 'image/png' before saving to the database.
Software Support
ImageMagick
Conversion Tools
Share & Embed
[](https://freewebptojpg.com/mime/image/png)
<iframe src="https://freewebptojpg.com/mime/image/png/embed" width="100%" height="280" style="border:1px solid #cbd5e1;border-radius:8px;" title="PNG 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/png.json
Open JSON
Frequently Asked Questions
What is the difference between image/png and image/x-png?
There is absolutely no difference in the actual image file. The 'image/png' string is the official IANA standard MIME type. The 'image/x-png' string was a temporary, experimental designation used primarily by old versions of Internet Explorer when uploading files to a server.
Why is my server receiving image/x-png files?
If a user is browsing your site with an extremely old browser (like Internet Explorer 6) or using a legacy enterprise application to submit HTTP POST requests, the client's internal registry may still map .png files to the image/x-png MIME type.
Should I allow image/x-png in my file upload validator?
Yes, but you should instantly normalize it. When your backend receives 'image/x-png', you should programmatically rewrite the MIME string in your database and storage logic to 'image/png' to maintain consistency and avoid future compatibility issues.