
Upcoming Changes to PNG Support at Twitter - polm23
https://twittercommunity.com/t/upcoming-changes-to-png-image-support/118695
======
dpedu
Semi-relevant thread about tricking this upload/convert system to keep images
in PNG:
[https://twitter.com/FioraAeterna/status/1077786781133631489](https://twitter.com/FioraAeterna/status/1077786781133631489)

------
whywhywhywhy
Tumblr was the last platform that actually respected my creative choices for
compression of my work and gave me full control over how my work was
presented.

Now people are acting as if Tumblr is over and yet again the so called
solution is to move your work to Instagram or Twitter.

Why is the “solution” always to move to platforms with little to no respect
for your actual work there. I’m tired of stressing over how an image/video
looks only to upload it to social media and have it covered in a JPEG Vaseline
smear.

This is before I bring up how far these networks also go in trying to keep me
from just dragging content out of their site and to my desktop

~~~
acct1771
Abstract previews that link to full HD content on a platform you control?

~~~
whywhywhywhy
This is a very sensible suggestion but I have tried this before with nice gif
previews linking to Vimeo and although the gif gets good engagement almost no
one clicks though

In reality the first impression is all you ever get on social media.

------
thebostik
This announcement makes sense to me, having done something similar before
personally (1). The difference between a screenshot of a photo saved as a PNG
and a JPG is huge, usually over 1MB, and I'm sure Twitter gets plenty of
these.

Publishing their thresholds for the JPG vs PNG size comparison instead of
referring to it just an internal metric would clear up some disconnect. Plus,
I'd love to improve the static values I chose if there is better data
available. I doubt the people working on this project wanted to change any PNG
unless it's clear cut but the line has to go somewhere. These will be better
handled by JPG.

Numbers about avg file size would be awesome too, how much data will this save
in a typical user session?

1 - [https://engineeringblog.yelp.com/2017/06/making-photos-
small...](https://engineeringblog.yelp.com/2017/06/making-photos-smaller.html)
(Section: Large PNG Detection)

~~~
jchw
The truth is, they already do convert almost every screenshot to JPEG. The
only criteria I'm aware of that Twitter ever used to keep something as PNG was
if it had any pixels that were not fully opaque.

------
bicubic
Can we talk about the awful video compression on Twitter and how the only
workaround to Twitter shitting on your video is to submit it as a perfectly
crafted gif which takes dozens of trial and error iterations to produce?

It's 2019. Every other media sharing site on the planet is friendlier to
preserving video quality than Twitter is. For a platform which carries so much
programming\technical content, having video compression set to 'DESTROY ANY
KIND OF PIXEL LEVEL DETAIL' is super painful. I can't be the only user that
stopped uploading video content because of the effort involved in hand-
crafting Twitter gifs.

Everything that can be achieved with these specially produced gifs could also
be achieved by simply upping video quality for small videos. Plus removing the
insanity of creating such content. Plus actually saving bandwidth since gifs
are super wasteful.

There's a whole category of articles about how to 'trick' Twitter into
preserving the quality of your image or video upload. That's insane. Define
and publish some compression specs at which you won't destroy the content.

~~~
midgetjones
The funniest and most depressing part of all this is that twitter 'gifs' are
mp4s

~~~
vardump
What video compression they use inside mp4 container?

~~~
midgetjones
Picked a "gif" at random:

    
    
      Format                                   : MPEG-4
      Format profile                           : Base Media / Version 2
      Codec ID                                 : mp42
      File size                                : 1.61 MiB
      Duration                                 : 4s 890ms
      Overall bit rate                         : 2 766 Kbps
      Encoded date                             : UTC 2018-06-07 09:34:57
      Tagged date                              : UTC 2018-06-07 09:34:57
    
      Video
      ID                                       : 1
      Format                                   : AVC
      Format/Info                              : Advanced Video Codec
      Format profile                           : Baseline@L3.0
      Format settings, CABAC                   : No
      Format settings, ReFrames                : 1 frame
      Codec ID                                 : avc1
      Codec ID/Info                            : Advanced Video Coding
      Duration                                 : 4s 890ms
      Bit rate                                 : 2 764 Kbps
      Width                                    : 720 pixels
      Height                                   : 414 pixels
      Display aspect ratio                     : 1.739
      Frame rate mode                          : Variable
      Frame rate                               : 33.538 fps
      Original frame rate                      : 1 000.000 fps
      Minimum frame rate                       : 33.333 fps
      Maximum frame rate                       : 1 000.000 fps
      Color space                              : YUV
      Chroma subsampling                       : 4:2:0
      Bit depth                                : 8 bits
      Scan type                                : Progressive
      Bits/(Pixel*Frame)                       : 0.276
      Stream size                              : 1.61 MiB (100%)
      Title                                    : Twitter v1.0-757770b7c8e9d79a526cdff77e74666386274fdf
      Writing library                          : x264 core 148
      Encoding settings                        : cabac=0 / ref=1 / deblock=1:0:0 / analyse=0x1:0x111 / me=hex / subme=2 / psy=0 / mixed_ref=0 / me_range=16 / chroma_me=1 / trellis=0 / 8x8dct=0 / cqm=0 / deadzone=21,11 / fast_pskip=1 / chroma_qp_offset=0 / threads=1 / lookahead_threads=1 / sliced_threads=0 / nr=0 / decimate=1 / interlaced=0 / bluray_compat=0 / constrained_intra=0 / bframes=0 / weightp=0 / keyint=250 / keyint_min=25 / scenecut=40 / intra_refresh=0 / rc=crf / mbtree=0 / crf=20.0 / qcomp=0.60 / qpmin=0 / qpmax=69 / qpstep=4 / ip_ratio=1.40 / aq=2:1.00
      Encoded date                             : UTC 2018-06-07 09:34:57
      Tagged date                              : UTC 2018-06-07 09:34:57

------
ec109685
This will start making screenshots uploaded to their service lossy, with
compression, which is unfortunate.

~~~
thanatos_dem
Not necessarily, depends on what it’s a screenshot of. If it’s of a web page
or application, odds are that it will have large sections of uniform color
(white backgrounds for instance). This is compressed very well in PNG, which
uses DEFLATE/LZ77.

So it’s pretty likely that the PNG will be smaller than the converted JPEG in
many cases. Screenshots of videos, photos, however will likely be converted.

------
pornel
Images from pngquant[1] will be left unscathed, so use it if you want to
preserve transparency and sharpness.

The PNG-8 variant is 3-4 times smaller than a truecolor PNG, which is why
Twitter is allowing it.

[1]: [https://pngquant.org/](https://pngquant.org/)

~~~
xyzzy_plugh
It looks like pngquant can change palette subtly, but for e.g. pixel art or
art with carefully selected palettes what are the downsides?

~~~
pornel
Pixel art is likely to have only a few dominant colors, so it should convert
losslessly or nearly so.

Most other quantization implementations unconditionally drop a few least
significant bits of colors, giving images a posterized look of a 16-bit
console. pngquant tries very hard not to do that, as its goal is to have no
visible loss, just smaller files.

------
no_gravity
I am not sure how to interpret the article. Does it mean there will be a way
to upload an 8-Bit PNG image as a header image and Twitter will store and
display it unmodified?

That would be a great step forward. Currently, the compressed header images
look really bad.

------
raymondgh
“image load performance needed at a global scale“

Looks like supporting high quality png can be added to our list of creative
things founders do to bootstrap their businesses that don’t scale. But
converting millions of existing pieces of content from transparent to white
background is surely a loss for the people. Not as bad as when Microsoft
rolled back everyone’s onedrive storage though.

~~~
mschwaig
> These changes will be applied to all images uploaded to Twitter from
> February 11th and forward, regardless of the category the image is for.

Looks like they only do the conversion for newly uploaded images beginning
Feburary 11th.

~~~
raymondgh
Ah rats. Reading comprehension fail. Thx. I guess the change is not really so
much to complain about, though I suppose it could be argued that they’re
dropping product quality after cementing large market share.

------
pram
The way Twitter and Instagram mangle and crap up images reminds me of how AOL
used to download all images in a really awful format:

[https://en.wikipedia.org/wiki/ART_image_file_format](https://en.wikipedia.org/wiki/ART_image_file_format)

The more things change!

------
maxst
If PNG-8 will be "preserved unmodified", then APNG in PNG-8 like this one will
probably work: [https://tinypng.com/images/apng/panda-
waving.png](https://tinypng.com/images/apng/panda-waving.png)

------
jchw
So in other words they're closing the loophole where you can force lossless by
adding a single transparent pixel.

This is almost definitely good for Twitter's bottom line, but no doubt it is
bad for a growing segment of their userbase: artists. People have been
flocking to Twitter from sites like deviantArt, Tumblr, etc. to escape drama,
harassment, policy changes, etc. for years now. The latest round of them come
from Tumblr's explicit content purge.

Now, I actually don't use Twitter. But the news of this change spread so
quickly that I already heard about it last night. So to say that this is a
problem is an understatement. I'm currently recommending to people to just
upload their work elsewhere and make use of Twitter's decent embedding
functionality. (Pixiv is a great site to post drawings, for example, and it
embeds decently on Twitter.)

(On the other hand, I do like that smaller PNGs win against JPEG - I am fairly
sure in the past, transparency was one of the only criteria that kept you as
PNG.)

~~~
anon_cow1111
Twitter is one of the worst sites to post artwork on. Not due to compression,
but the complete lack of features a dedicated art gallery normally has.
Tagging and searchability are bad. Artists don't usually make separate
accounts for art and blogs/memes so good luck filtering it. No one's going to
see your old content.

I can't remember pixiv's rules specifically, isn't it based in japan? The
black line censorship thing isn't going to fly with anyone who left tumblr
because they banned NSFW.

~~~
jchw
It has flied with plenty of artists actually, many of them I personally know
have taken the compromise long before Tumblr officially banned pornographic
content. In addition, Pixiv doesn't moderate this super actively; it turns out
if you stick uncensored variants outside page 1 you generally get a blind eye.
Generally, people are a lot less afraid of having their entire accounts banned
for rule violations, unlike American websites. (This case is particularly
fascinating to me because said rule violation is quite literally breaking the
law... but apparently they are still more lenient than Western websites tend
to be about mundane issues.)

I'm not saying I disagree that Twitter is a terrible site for artists. But,
artists want a social platform where they can both post freely and interact
with non-artists or people in different forms of art. Pixiv and SoundCloud are
both great websites, but it turns out A.) A lot of people dabble in both music
production and drawing, and B.) A lot of the same people in both of these art
forms interact with eachother. (This is especially apparent looking at indie
games and gamejams!)

Fwiw, Twitter has been pretty mixed on NSFW content. They've turned a blind
eye to most of it. Especially for Japanese-speaking users, presumably because
Japanese advertisers don't have the same mentality as Western ones do. Still,
I've heard of a few accounts being banned for vague reasons.

So yeah... Twitter is not great for art. But, artists want a general social
platform to hang out in, and for many Twitter is currently serving that
purpose for better or worse.

------
bitwize
Is it too much to ask that Twitter serve the _very same_ image I uploaded
without subjecting my content to AOL-style "optimizations"?

------
zyx321
Didn't know PNG supported palette mode. From a pure image quality standpoint,
is there any difference between a palette PNG-8 and a still GIF?

~~~
kevin_b_er
The PNG supports translucent pixels, not just 100 or 0% transparency.

~~~
donatj
Yep. Photoshop's PNG library however does not, it's palleted PNG support
doesn't handle Alpha for some reason.

------
rvSGK4
Couldn't they store both versions and return the better version if a tweet
became popular?

~~~
acct1771
This seems like YouTube feedback loops on hot videos.

Images who already have virility will be the ones in full res.

------
aviraldg
Yes, what a great feature to work on while they've spent 6+ months on
restoring access to many of their earliest users[1] with nothing to show for
it, and no further communication from their support.

[1]
[https://www.theguardian.com/technology/2018/may/31/twitter-b...](https://www.theguardian.com/technology/2018/may/31/twitter-
blocking-users-who-were-underage-when-they-signed-up)

