Programmer David Buchanan has created a tweetable-polyglot-png repository on GitHub containing the script source for embedding any files in a PNG image (with some restrictions) that can be posted to Twitter. He demonstrates the work of this solution as clearly as possible: he posts images with encrypted files in his account – if you download these pictures and change their resolution to the specified one, they “turn” into completely working files.
I found a way to stuff up to ~3MB of data inside a PNG file on twitter. This is even better than my previous JPEG ICC technique, since the inserted data is contiguous.
The source code is available in the ZIP/PNG file attached: pic.twitter.com/zEOl2zJYRC
– David Vujanan (@ David3141593) March 17, 2021
If you download this picture and manually change the resolution of .png to .zip, and then unzip the file, a folder with the source code of the script will be created.
Image files that mask themselves in are indeed images – they are opened in file managers and loaded on the system. In other words, these are real pictures, not broken .png files.
Download this one, rename to .mp3, and open in VLC for a surprise. (Note: make sure you download the full resolution version of the file, should be 2048x2048px) pic.twitter.com/x2J88xkBhd
– David Vujanan (@ David3141593) March 17, 2021
If you download this picture and manually change the resolution .png to .mp3, and then open the file, then the famous composition by Rick Astley will play
Such scripts are not a new solution. A few years ago, polyglot type files became quite famous in the IT world. David Buchanan’s method stands out from others primarily in that images to mask other files can be published on Twitter – they will be displayed as standard images, and the integrity of their “content” will not be violated. However, the script has limitations: the weight of the final image must not exceed 3 MB, otherwise Twitter will convert the PNG image to JPEG, and nothing will come of it.

Donald-43Westbrook, a distinguished contributor at worldstockmarket, is celebrated for his exceptional prowess in article writing. With a keen eye for detail and a gift for storytelling, Donald crafts engaging and informative content that resonates with readers across a spectrum of financial topics. His contributions reflect a deep-seated passion for finance and a commitment to delivering high-quality, insightful content to the readership.