7

Example:

enter image description here

Why do PNG images sometimes become JPEG after going though the SE image uploader?

As far as I know, SE doesn't resize images if too large (> 2 MiB).


I use this image. File information:

C:\progs\exiftool-12.44>"exiftool(-k).exe" unwanted-convert-to-jpeg.png
ExifTool Version Number         : 12.44
File Name                       : unwanted-convert-to-jpeg.png
Directory                       : .
File Size                       : 1837 kB
Zone Identifier                 : Exists
File Modification Date/Time     : 2022:08:07 17:15:39-07:00
File Access Date/Time           : 2022:08:07 18:55:55-07:00
File Creation Date/Time         : 2022:08:07 18:55:55-07:00
File Permissions                : -rw-rw-rw-
File Type                       : PNG
File Type Extension             : png
MIME Type                       : image/png
Image Width                     : 2123
Image Height                    : 1134
Bit Depth                       : 8
Color Type                      : RGB with Alpha
Compression                     : Deflate/Inflate
Filter                          : Adaptive
Interlace                       : Noninterlaced
SRGB Rendering                  : Perceptual
Gamma                           : 2.2
Pixels Per Unit X               : 9448
Pixels Per Unit Y               : 9448
Pixel Units                     : meters
Exif Byte Order                 : Big-endian (Motorola, MM)
Orientation                     : Horizontal (normal)
Date/Time Original              : 2022:08:07 14:24:32
User Comment                    : Screenshot
Color Space                     : sRGB
Exif Image Width                : 2160
Exif Image Height               : 1620
XMP Toolkit                     : XMP Core 6.0.0
Date Created                    : 2022:08:07 14:24:32
Image Size                      : 2123x1134
Megapixels                      : 2.4
-- press ENTER --

PS: you may notice the white flash and the slow explorer.exe in the above GIF image. Solutions are welcome.

1

2 Answers 2

2

It might not be a PNG, but just an image which happens to have a PNG extension. Photos are usually in JPEG format, which can also be seen by looking at the first few bytes of the file. Imgur detects this and decides to serve the image with the correct extension. (This might not be your situation, but I just scienced this.)

2
  • Yeah, just leaving it up for future readers with the same question.
    – Glorfindel Mod
    Commented Aug 8, 2022 at 6:39
  • 2
    Good idea. That was actually my first suspicion, that's why I ran exiftool on it :) Commented Aug 8, 2022 at 6:40
1

You are probably an anonymous user on imgur.com:

Maximum File Size

The maximum file size for non-animated images (think JPG, PNG, etc) is 20MB. PNG files over 5MB will be converted to JPEGs.

[...]

Non-animated images over 1MB for anonymous uploads and 5MB for account holders will be lossily compressed.

Sources and read more:

6
  • 3
    SE dosen't convert/shrink. It'll just error out. Its not the same as the standard imgur uploader Commented Aug 8, 2022 at 6:44
  • 2
    Based on testing from another question, it appears the 1MB limit for conversion does apply to us.
    – animuson StaffMod
    Commented Aug 8, 2022 at 6:57
  • @JourneymanGeek That's the hard limit for the file being process at all, which is different from Imgur's "I'm going to change this for you" limit.
    – animuson StaffMod
    Commented Aug 8, 2022 at 6:58
  • 1
    @DialFrost The photo shows it being uploaded over se, not imgur. So the imgur/login limits may not apply Commented Aug 8, 2022 at 7:04
  • 4
    Nope! SE has a separate agreement with imgur - and we don't log in to upload images, its through their API. There's no difference between 'anonymous' and regular user uploads as far as imgur's limits for us. Commented Aug 8, 2022 at 7:19
  • I tested this and it does seem to be the case that large PNG images are converted to JPEG. Commented Aug 8, 2022 at 18:19

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .