AI-Generated Image Metadata Explained
Examining the byte-level structures used by modern generative engines to serialize generation parameters into image containers.
Modern AI generators do not alter pixels to store prompts; instead, they embed textual metadata payloads inside standard container chunks defined by image format specifications.
PNG: Chunks and International Text (iTXt)
The Portable Network Graphics (PNG) standard divides files into data blocks called chunks. Stable Diffusion and ComfyUI implementations frequently write to:
- tEXt chunk: Stores key-value pairs formatted as Latin-1 text (e.g.,
parameters: prompt string, steps, sampler, CFG, seed). - iTXt chunk: Supports uncompressed or zlib-compressed UTF-8 text strings, often holding complete node graphs for complex workflows.
JPEG & WebP: EXIF UserComment & XMP Packets
Since JPEG does not utilize PNG-style chunks, generative engines utilize:
- APP1 Marker (EXIF): The
UserCommenttag (Tag ID0x9286) is standard for holding serialized JSON parameter blocks. - APP1 Marker (XMP): Extensible Metadata Platform packets formatted in XML describing creation tools and content provenance.
Stripping vs. Recompression
A pure metadata remover can strip these container chunks without re-encoding pixel data, preserving 100% of image fidelity with no compression artifacts.
Ready to Clean AI Headers?
Inspect and strip tEXt, iTXt, and UserComment chunks in-browser.