

A Minilith Approach to Web Performance :)
Still building your micro blog with a graveyard of outdated plugins! Try Minilith, the CMS inside an image! No dependency bloat or plugin maintenance. Author your content and share it with the world!
Using LSB encoding and tEXt chunks to create an executable polyglot PNG (A micro-CMS stored in an image)
I got into steganography by building games in PICO-8 and studying how it packs data into the virtual cartridges. That sent me down a rabbit hole: could this same concept power a full content management system?
Over the last year or so I have been building Minilith, an experimental tool that takes an entire JSON state (posts, pages, site settings), compresses it, and embeds it into a 256x256 PNG to act as a portable DB.
The architecture is completely client side and zero-dependency. There is no backend or build step, and it relies entirely on native browser APIs to extract and render the site directly from the image.
The Encoding Process:
- The payload is deflated and injected into the image's RGB channels using 3-3-2 LSB encoding I chose this to increase the storage and maintain the image size. Minilith gives a hard limit of 64KB of compressed data, an intentional constraint which allows for nearly 200KB of uncompressed data which is a ton of text and perfect way to keep a micro blog micro!
- To ensure the image is executable, I inject a raw tEXt chunk containing a vanilla JS extraction script right before the IEND marker. This turns the image into a polyglot.
- Before the payload is allowed to decompress and run, a visual fingerprint (SHA-256) and a cryptographic signature are verified client side.
The flaw as expected is aggressive image optimization destroying the payload. I actually view this as a feature to keep the content secure from unwanted distribution. (Though funny enough, sending the raw image over iMessage keeps the payload intact).
Read more on the process here: Can a PNG Be a Database? The Architecture of Minilith
Has anyone else messed around with executable image polyglots for practical data storage? Would love to hear about similar projects.
San Diego 2019 | Canon AE-1 | Ilford HP5
Recently developed and scanned an roll of film I found around the house. Come to find out it was from a trip I took to San Diego in August of 2019.
Enjoy.
Camera: Canon AE-1
Lens: 50mm f/1.8
Film: Ilford HP5
Developer: CineStill Df96 Monobath