Danbooru

Twitter converting PNGs to JPGs

Posted under General

It seems like Twitter has, in the past week or so, changed something about how their upload system handles PNGs. Around the same time a bunch of Twitter artists who previously consistently uploaded PNGs started having all of their uploads become Twitter's very lossy JPGs. (for example, himura kiseki's posts in the weeks past this point)

Attempting to upload your own PNGs via their system seems to get them converted the vast majority of the time, but not all of the time. I can't really nail down any consistent factors between the files that avoid conversion, but there's probably something obvious I'm missing.

I was wondering if anyone could figure out what exactly differs between the files that do and don't get converted to JPG and if there's actually any possibility of accessing the original PNG files. .png and .png:large versions of all of these posts do exist, but as far as I can tell those urls always existed for JPG posts, and are visibily just the jpeg compressed versions converted back to PNG.

Updated

tapnek said:

Have you tried it out yourself to see if its true?

hurrghhurrgh said:

Attempting to upload your own PNGs via their system seems to get them converted the vast majority of the time

https://pbs.twimg.com/media/CY9UlYuUMAAJj3S.png:orig is the last PNG upload of Himura's.
https://pbs.twimg.com/media/CaKpG7kUcAYX2Pb.jpg:orig is the same PNG uploaded today by me which gets autoconverted to JPG.

After testing it a bit more I think the consistent factor is the bit depth. Everything with a bit depth of 24 gets converted to JPG. Everything with a bit depth of 32 stays PNG. And everything with a bit depth above 32 also gets converted to JPG.

The twitter conversion was always buggy, like recompressing PNG resulting in even bigger PNG. I guess they wanted to convert everything to JPG when they introduced the recompression system and are slowly getting there. Very slowly. lol

1