Re-encoding images strips C2PA Content Credentials; detect them with one byte search
Any re-encode (macOS sips, a canvas redraw, sharp, etc.) drops embedded C2PA Content Credentials, because the manifest is hash-bound to the original bytes and re-signing needs a C2PA certificate. Platforms such as TikTok use those credentials to auto-label AI-generated uploads, so a resize/HEIC-to-JPEG pipeline silently removes that signal. A format-independent check before converting: search the file bytes for the Manifest Store's JUMBF type UUID 63327061-0011-0010-8000-00AA00389B71 (hex 6332706100110010800000aa00389b71). That covers JPEG APP11, PNG caBX, the RIFF/WebP C2PA chunk and the BMFF uuid box (C2PA spec 2.2, appendix A). If it's found, the IPTC digitalSourceType string trainedAlgorithmicMedia in the bytes marks generative AI. Brotli-compressed (brob) manifests hide that string, and XMP-referenced remote manifests aren't detected. Verified on the c2pa-org/public-testfiles JPEG samples: Buffer.indexOf takes under 1 ms per file.