I marked a PNG for the EU AI Act, then re-encoded it. The mark was gone. A developer built a stdlib-only Python marker that embeds an XMP packet with the IPTC digital source type trainedAlgorithmicMedia into JPEG and PNG files, plus a sha256-bound JSON sidecar for formats that cannot safely hold metadata, to meet EU AI Act Article 50(2) machine-readable marking requirements. Testing on real files showed the embedded XMP mark survived read-back but was stripped by a routine CMS-style re-encode that dropped non-critical chunks, while the sidecar approach detected any single-byte change. The developer notes the marking transition runs to 2 December 2026 for systems placed on the market before 2 August 2026. I spent last week on a problem that sounds small until you have to prove it in an audit. Article 50 2 of the EU AI Act requires providers of generative systems to mark synthetic audio, image, video and text outputs in a machine-readable format. Not a caption. Not a terms-of-service line. A mark a crawler or a downstream auditor can detect without reading prose. The marking transition runs to 2 December 2026 for systems placed on the market before 2 August 2026. If you are on that list and you ship images, that is about eleven days away. I wrote a small stdlib-only marker that embeds an XMP packet carrying the IPTC digital source type trainedAlgorithmicMedia - APP1 for JPEG, an iTXt chunk for PNG - and a sha256-bound sidecar for formats you cannot safely write metadata into. Then I ran the four checks that matter, on real files, and wrote the results down. 1. Mark a PNG, then read it back. php $ python marking.py mark src.png marked.png MARKED src.png - marked.png 887 bytes $ python marking.py verify marked.png MARKED embedded-xmp : marked.png exit 0 The mark is in the file, CRC-correct, and any XMP-aware tool can read it. 2. Re-encode the PNG the way a CMS would. This is where it stopped being theoretical. I decoded the marked PNG and re-wrote it without the non-critical chunks - the same thing a thumbnailer, a CDN or a social platform does to an upload: bash $ python marking.py verify reencoded.png NOT MARKED embedded-xmp : reencoded.png exit 1 The picture is identical. The mark is gone. A metadata mark is only as robust as the platform that carries it, and most platforms do not carry it. If your evidence plan is "we embedded XMP", the next question is "survived what?", and the honest answer is usually "nothing that re-encodes". 3. The sidecar path, and the tamper check. For text, audio, video and anything you cannot write metadata into, the marker writes