Don’t Let Twitter Convert Your PNGs to JPGs

When you embed a static image on Twitter, it tries to compress it as a JPEG to save bandwidth. For photographs, this is usually fine; JPEG was designed for photographs. But digital art, infographics, and screenshots tend to look best in PNG format. If you upload them as PNGs, Twitter will compress them to JPEG anyway, and they can get crappy. Here’s how to fix it.

Game developer Andy McClure noticed Twitter’s compression when she uploaded a crisp PNG screenshot full of pastel blocks, and Twitter spat out a JPEG cluttered with compression artifacts. (If you click to zoom in, you’ll see everything around a one-pixel blue line crossing the magenta.)

McClure tweeted this cleverly, and game author Christine Love responded with a fix: Add some transparency, even a pixel, to your PNG, and Twitter won’t turn it into a JPEG. You can even make the pixel slightly transparent.

If you run into any problems, there are more technical details in this thread. For example, you need to save as a true PNG color, not as an optimized PNG. (While you’re there, all game creators on this thread should subscribe.) A little tweak should eliminate these artifacts and keep your image literally pixelated.

More…

Leave a Reply