{"id":"image-pjpeg","mimeType":"image/pjpeg","name":"Progressive JPEG (Legacy IE Alias)","shortName":"PJPEG","category":"Legacy \u0026 Web","extensions":[".jpeg",".jpg",".pjpeg",".pjp",".jfif"],"description":"The image/pjpeg MIME type is an obsolete, non-standard alias for Progressive JPEG images. It was historically generated by older versions of Microsoft Internet Explorer (specifically IE 6 through IE 8) during file uploads. Both baseline and progressive JPEGs should always use the standard image/jpeg MIME type in modern web development.","seo":{"title":"image/pjpeg MIME Type | Complete Developer Reference \u0026 Magic Bytes","description":"Complete reference for the obsolete image/pjpeg MIME type: why Internet Explorer used it, magic bytes, HTTP headers, and how to handle it in modern backends.","faqs":[{"question":"Is image/pjpeg a valid MIME type?","answer":"No, it is a non-standard MIME type created by Microsoft for older versions of Internet Explorer. The official and universally supported MIME type for all JPEGs, whether progressive or baseline, is image/jpeg."},{"question":"What is the difference between image/jpeg and image/pjpeg?","answer":"Technically, there is no difference in the file structure or rendering capability. An image/pjpeg is just a standard JPEG file (usually encoded progressively) that happened to be uploaded from an old version of Internet Explorer."},{"question":"How should my backend handle image/pjpeg file uploads?","answer":"If you are building a file upload validator, you should map image/pjpeg directly to image/jpeg and process it as a standard JPEG. If you strictly block image/pjpeg, users on legacy corporate systems or older Windows machines may encounter upload errors."}]},"index":{"compression":["Lossy (DCT)"],"browserSupport":{"score":5,"label":"Universal (Renders as standard JPEG)"},"commonUses":["Legacy Internet Explorer File Uploads","Progressive Image Rendering (Historical context)"]},"technical":{"magicBytes":{"hex":"FF D8 FF E0 (JFIF) / FF D8 FF E1 (Exif)","ascii":"ÿØÿ"},"container":"JPEG (ISO/IEC 10918-1)","compressionAlgorithm":["Discrete Cosine Transform (DCT)"],"colorDepth":["8-bit","12-bit"],"transparency":false,"animation":false,"metadata":{"exif":true,"xmp":true,"iccProfile":true},"alphaChannel":false,"progressiveLoading":true,"hdrSupport":false},"history":{"developer":"Joint Photographic Experts Group / Microsoft (Alias)","released":"1992","specification":"ISO/IEC 10918-1"},"browserSupport":{"chrome":true,"chromeVersion":"All","firefox":true,"firefoxVersion":"All","safari":true,"safariVersion":"All","edge":true,"edgeVersion":"All","internetExplorer":true},"softwareSupport":[{"name":"All Modern Web Browsers","logo":""},{"name":"Adobe Photoshop","logo":""},{"name":"ImageMagick","logo":"image-magic.webp"}],"conversion":{"convertTo":["png","webp","avif","tiff"],"convertFrom":["png","webp","tiff"]},"developer":{"httpHeaders":[{"header":"Content-Type","value":"image/jpeg"}],"htmlAccept":"image/jpeg, image/pjpeg, .jpg, .jpeg","fileDetection":["Check the first 3 bytes for the standard JPEG signature: FF D8 FF","Map any incoming 'image/pjpeg' Content-Type headers directly to 'image/jpeg' in your backend routing"]},"prosCons":{"pros":["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"],"cons":["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"]},"specifications":{"url":"https://jpeg.org/jpeg/","rfc":"RFC 3797 (Standardizes image/jpeg)","mimeAliases":["image/jpeg"]},"developerSnippets":{"python":"import magic\n# Libmagic will correctly identify the file as 'image/jpeg' regardless of the 'pjpeg' extension or legacy IE headers\nprint(magic.from_file('upload.pjp', mime=True)) # Outputs 'image/jpeg'","nodejs":"// In Express.js (Multer), map pjpeg to jpeg to prevent upload rejection\nif (file.mimetype === 'image/jpeg' || file.mimetype === 'image/pjpeg') {\n  cb(null, true);\n}","go":"import \"net/http\"\n// http.DetectContentType will resolve progressive JPEGs to \"image/jpeg\", completely ignoring the legacy pjpeg alias.","php":"// Standardize legacy IE uploads in PHP\nif ($_FILES['image']['type'] == 'image/pjpeg') {\n    $_FILES['image']['type'] = 'image/jpeg';\n}"},"relatedFormats":["jpeg","webp","png","avif"]}
