Feedback for "Upcoming Changes to PNG Image Support"

png
images

#1

This thread is open for feedback to the Upcoming Changes to PNG Image Support announcement



#2

I hope that Twitter uses MozJPEG to compress size even more with the same image quality.
Also, you should consider modern formats like WebP, currently supported by Chrome, Edge and Firefox.

Adding support to various formats can be a hassle, but It will save your users a lot of money in terms of data usage.

Thanks!


#4

I hope that Twitter uses MozJPEG to compress size even more with the same image quality. Also, you should consider modern formats like WebP, currently supported by Chrome, Edge and Firefox.

Adding support to various formats can be a hassle, but It will save your users a lot of money in terms of data usage.

Thanks!

Thanks for the feedback @RME

I don’t know how much detail I can get into about the specific codec we use, but we have optimized our codec for a balance of many considerations we need to make and it is abstracted to be replaceable when we need to make changes.

For choosing a modern format, we have definitely experimented with them in the recent past and will continue to evaluate them in the future. There are tradeoffs that we need to consider when changing formats or splitting the image across multiple formats (such as both JPEG and WebP in your example). At this time, nothing has reached a tipping point where we can make that leap, but it is something we regularly evaluate so don’t be surprised if one day things do change there. For now, it is JPEG mostly with some PNG.


#5

This action feels very unfair to artists who use Twitter, especially if it’s one of their main platforms. A lot of sites have changed or had long lasting issues that make it hard for artists to post their work, whether it being restricting what’s allowed to be posted, having to fit strict sizing dimensions that end up cropping a lot of the artwork, or having a lack of quality with the image resolution. I think enforcing no pngs will make a lot of artists so upset, they will stop using your platform and try to find a better place to post their work elsewhere.
Artists have been getting the short end of the stick on social media for a long time, I don’t see why anyone should drive that further.


#6

@SeizeTheSubsea

We do want artists to feel both welcomed and well supported by the image technologies that Twitter provides. One of the easiest ways to maximize quality is by simply uploading higher resolution images. In working with artists directly, nearly all problems alleviated when they realized Twitter supports uploading images up to 2048x2048 pixels by default – much higher than most platforms. Many users upload at 1080 or lower quality because they have come to expect that to be the limit, but Twitter’s limits are much higher.

Here is an example of a photograph and the quality difference between a 960 pixel bounded image uploaded and a 2048 pixel bounded image uploaded.

https://twitter.com/NolanOBrien/status/1075893067024986112

The difference is stark and is the quality we have strived for that took years to build out in a scalable way that reaches users globally. Here’s a zoom in of the quality difference by just uploading at the limit of 960x960 vs Twitter’s supported limit of 2048x2048:
image13 image7


#7

That presumes a higher resolution version of the art existing or being appropriate, because Twitter assumes that fine detail can be discarded with JPEG compression and if it is needed, higher resolution (making the detail less “fine”) can compensate. But the reason it is a common practice for artists to deliberately add a single transparent pixel to PNG uploaded to Twitter, thus (currently) forcing Twitter not to convert to JPEG, is that the fine detail in small images is very important to artists and the JPEG format is not suited to, in particular, digital art and pixel art. For a lot of art a higher resolution isn’t available or appropriate, and upscaling as a workaround for Twitter’s assumptions about resolution creates its own problems for everything except pixel art.


#8

Thanks for commenting @hikari_no_yume

Art is an important thing to keep in mind with images on Twitter, and I wish there wasn’t a barrier of red tape for me to post a blog article to show how Twitter can still support great art. Since my already drafted post is going to be stuck with higher powers for who-knows-how-long, I will try to talk to some of your concerns here.

Pixel art has been a top of mind concern when making this change, which was part of why we ensured PNG8 support would be available before we transitioned. A PNG8 image is a lossless PNG, but has a limit of 256 colors. Folks might be surprised by how many images can stay within 256 colors, especially illustrations and specifically pixel art. A pixel art image uploaded using PNG8 will never be converted to JPEG. Additionally, as you eluded to, you can also easily scale pixel art by making the pixels larger (instead of a 1x1 pixel, it could be 4x4 pixels per art “pixel” or 8x8 pixels per art “pixel”), which can help for the viewers when operating systems will do interpolation by default when zooming on a small resolution image.

For illustrations, the best thing is also to maximize the resolution. As you mentioned, there are cases when some art has been created that simply doesn’t have more resolution to upload. If the illustration has many solid colors and strokes, a PNG8 (256 color palette) image can often preserve that image losslessly. If there are gradients in the image, PNG8 means having to sacrifice clean color grading for color banding, which might be undesirable. Twitter will also preserve the PNG image if it maintains a smaller file size than the JPEG version at our own internal metric (basically, we’re going to compare the JPEG file size to the PNG file size and the smaller one is used – but the metric could change to be more sophisticated so we used loose language in our announcement). Using tools like tinypng.com or ImageOptim might help achieve this.

A final option for low resolution detailed images that cannot use PNG8 and also will be larger as PNG than JPEG is to still follow the pixel scaling concept that is great for pixel art. By having larger “pixels”, the JPEG compression can end up having less impact. It’s not going to be an outright lossless solution, but it offers a level of mitigation that might preserve the quality to share the art proudly.

Here’s an example of how this works with text:
https://twitter.com/NolanOBrien/status/1075893046628118528

We know that at some times there will always have to be a compromise. We have users around the world that do not have the bandwidth speeds to enjoy full PNGs. Even a preview PNG image for more than 50% of the world will take so long to load it will timeout or the user will just pass by the tweet since its too slow to load. We want to deliver media to users everywhere, and the large PNGs on Twitter may as well not even be there given how many users just see an empty box. It’s a compromise, but we want to maximize how much quality can be supported while at the same time maximizing the reach an image can have to be viewable no matter what your bandwidth constraints are – and most PNGs simply cannot meet that need.


#9

Thank you for your considered response!


#10

In very many cases art will have large areas that png can optimize well (such as monocolor backgrounds), so long as you tune your filesize comparison well you should be good with preserving artwork as png when appropriate.


#11

hi there,

i’ll preface this by saying i’m not incredibly knowledgeable in the architecture that goes behind image hosting, but i do know, as an artist who uses twitter as one of my primary platforms, the continued changes that put artists at a disadvantage is making twitter less and less desirable as a platform, and it’s incredibly frustrating for many artists, that it feels like this site is just pushing against us and making us having to jump through constant hoops to post our art in acceptable compression. not every artist uses programs that allows them to save in PNG8, or for web, or whatever else. for instance, an incredible popular tool artists use, Paint Tool SAI (1/2) does not offer any such specific support. this means that artists have to run art through other programs, that they may not be able to accommodate, to post.

this makes Twitter less appealing to us. it’s already quite a hassle to do the single pixel trick - i can’t just post my art as is, i have to make sure i’ve edited it beforehand to get around twitter’s compression. the simple fact that we had to find a workaround to bypass compression entirely means that the compression used is not viable for artists. it makes art look horrible, that’s the truth. especially images with colours in the red range, or gradients, it looks awful. yes, it works for photography, but that’s exactly it - JPEG was invented for photography, not for art.

i understand space and broadband concerns, i definitely do. but a lot of other sites are able to manage this, so i’m not really sure why Twitter can’t? you COULD allow us to upload quality 10 JPEGs and not compress them further, but i’m concerned that wouldn’t ever be implemented. you could also provide users the option to choose if they want compressed or uncompressed images, for bandwith concerns. i just feel like there are better solutions for this than dropping transparency support all together?! it’s nearly 2019, transparency is used a lot, and just dumping it entirely feels like shooting yourselves in the foot.

i apologize for an emotionally charged response, it is just upsetting to have to constantly fight against a site to provide art - something which many users use twitter specifically for, and would quit otherwise. thank you for reading, and i really hope this change can be re-evaluated.


#12

Thank you for replying @sillyvizion

You particular callout on the burden this is putting on artists is valid. We are going to bring that feedback in specifically and evaluate what we can do to better support artists with tooling specifically. I don’t run the roadmap, unfortunately, but I would like to push for more tooling to help.

I can understand being very convinced that the compression used is not viable for artists. Would you be willing to engage on Twitter and provide me with some specific examples? I would like to work with the examples you have in mind to see how far we have to go in finding even better solutions. DM or @ mention me freely https://twitter.com/NolanOBrien

I would like to fight for artists too, and I am. Big co life makes conflicts of priorities a frustration, particularly for users who feel particularly left out. I hope I can continue to help. Thank you.


#13

Will this impact images already uploaded to Twitter (for example, avatars)? Or will this only impact images uploaded after the change is implemented?


#14

The thing about artists posting higher resolution pictures on twitter is that it makes it easier for thieves to repost their artwork and have it printed and sold on say t-shirts etc. It’s not just posting a higher resolution personal picture. Which is usually why they will resize it down to a smaller size without slapping a huge watermark over it at the same time.


#15

@dstaley

This is a good question and though I thought it was applied everywhere, I am seeing that the info I am working off of doesn’t specify one way or the other. Let me get back to you on this.


#16

Thanks for commenting @aumoras

This has come to our attention and we are considering use cases here.

The current suggestions are to use a watermark (which you’ve already mentioned) or to scale up the image (so that each pixel is 4x4 pixels or so) to preserve quality better without giving away something printable.


#17

@dstaley

Just confirmed this change will apply to all image categories, including avatars. Do you have any follow up questions about that?


#18

So, just to clarify, this change will be applied retroactively to avatars already uploaded? (Basically do I need to reupload my existing PNG-24 avatar as a palletted PNG-8 avatar to avoid JPEG compression?)


#19

@dstaley

This will only apply to new image uploads. Legacy avatars will be unchanged. Once the change happens, using a PNG8 avatar is a good idea though if you are able to do so.


#20

I’ve confirmed Twitter is using something similar to MozJPEG so that is covered.

Also, I have tested converting two Twitter-JPEGs to WebP without visible quality loss and these are the results:

JPEG is 2x the size of a similar WebP image.

WebP DuFT… Effort 6, Quality 75 -> 281->142kB 49% smaller
WebP DvG9… Effort 6, Quality 75 -> 248->110kB 55% smaller

First image: https://pbs.twimg.com/media/DuFT8cdV4AADLBT.jpg:large
Second image: https://pbs.twimg.com/media/DvG9fFOU8AI-JIh.jpg:large

Converter tool: https://squoosh.app (App made by Google)


#21

It would be nice if Twitter ran a PNG optimizer on the image, and took the smallest of the resulting PNG and compressed JPEG (perhaps using gzipped sizes since the files would be going over the network).

Further, no-one wants a magic black box that sometimes ruins your art. You should be able to preview exactly how it will show up, and you should be able to control it.