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.

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.

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.

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:

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.

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.

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.

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.

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.

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.

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.

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.

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.

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.

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.

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?)

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.

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.