Remove AI Image Metadata
Remove explicit embedded AI provenance or generator metadata using a format-aware workflow. Preserve encoded image content and rendering data whenever possible.
Workflow
Resolve the exact files or folder in scope and identify each real file format from its contents.
Inspect before writing. For PNG, JPEG/JPG, WebP, and GIF, use the bundled cleaner without a write option:
python "<skill-folder>\scripts\clean_image_metadata.py" "<file-or-folder>" --recursive
Review every proposed removal. Default mode removes C2PA/Content Credentials blocks and metadata fields that contain known AI-generator markers.
Choose a write mode:
Prefer verified copies when replacement was not explicitly requested:
python "<skill-folder>\scripts\clean_image_metadata.py" "<file-or-folder>" --recursive --output-dir "<clean-folder>"
Use --in-place only when the user wants the originals changed. Add --backup-dir "<folder-outside-the-publish-folder>" when a backup is useful.
Add --all-metadata only when the user asks to remove all removable non-rendering metadata. Preserve color profiles and functional animation data.
Confirm every changed file reports PASS. The cleaner reparses the written container and confirms that encoded PNG, JPEG, WebP, or GIF image payloads are unchanged.
Inspect the cleaned output again when extra verification is appropriate.
Report the number of files processed, exact output path, formats handled, and metadata removed.
Format Routing
- Use the bundled script for byte-preserving PNG, JPEG/JPG, WebP, and GIF cleanup.
- For TIFF, HEIC/HEIF, AVIF, SVG, PSD, or another format, inspect available format-aware tools such as ExifTool or
c2patool. Work on copies unless in-place replacement was requested. Verify the result with the same tool plus a decoder.
- If no safe handler is available, stop and report the unsupported format. Do not generically re-save or convert the image merely to strip metadata; that may alter pixels, animation, orientation, color, or compression.
Operational Rules
- Process only images you own or are authorized to modify. Do not remove provenance metadata to misrepresent an image's origin or bypass a platform's disclosure requirements.
- Never claim a cleaned image is undetectable or guaranteed not to be classified as AI-generated. State only which explicit metadata was removed. Pixel-based classifiers may still guess.
- Preserve encoded picture data, ICC profiles, gamma/chromaticity information, JPEG color-transform markers, animation control, and other rendering-related data.
- In default mode, preserve unrelated copyright, authorship, descriptions, and location metadata unless the user requests broader removal.
- Warn when removing a whole EXIF block could also remove orientation or other co-located fields. Prefer a metadata-aware editor when selective EXIF tag deletion is possible.
- Keep backups outside the upload/publish folder so tagged originals are not selected accidentally.
- Stop on malformed containers, failed integrity validation, changed encoded-image hashes, or incomplete post-clean inspection.
Common Invocations
Inspect supported images:
python "<skill-folder>\scripts\clean_image_metadata.py" "C:\path\images" --recursive
Clean originals after explicit confirmation:
python "<skill-folder>\scripts\clean_image_metadata.py" "C:\path\images" --recursive --in-place
Create clean copies:
python "<skill-folder>\scripts\clean_image_metadata.py" "C:\path\images" --recursive --output-dir "C:\path\clean-images"
The bundled cleaner uses only the Python standard library.
1---2name: remove-ai-image-metadata3description: Inspect, remove, and verify embedded AI-generator or provenance metadata in image files without changing encoded picture data when the format permits. Use for any image-metadata cleanup request involving GPT Image, OpenAI, DALL-E, C2PA, Content Credentials, generative-AI labels, EXIF/XMP generator fields, or similar provenance in individual images or folders, including PNG, JPEG/JPG, WebP, GIF, TIFF, HEIC/HEIF, AVIF, SVG, and other image formats.4---56# Remove AI Image Metadata78Remove explicit embedded AI provenance or generator metadata using a format-aware workflow. Preserve encoded image content and rendering data whenever possible.910## Workflow11121. Resolve the exact files or folder in scope and identify each real file format from its contents.132. Inspect before writing. For PNG, JPEG/JPG, WebP, and GIF, use the bundled cleaner without a write option:1415 ```powershell16 python "<skill-folder>\scripts\clean_image_metadata.py" "<file-or-folder>" --recursive17 ```18193. Review every proposed removal. Default mode removes C2PA/Content Credentials blocks and metadata fields that contain known AI-generator markers.204. Choose a write mode:2122 - Prefer verified copies when replacement was not explicitly requested:2324 ```powershell25 python "<skill-folder>\scripts\clean_image_metadata.py" "<file-or-folder>" --recursive --output-dir "<clean-folder>"26 ```2728 - Use `--in-place` only when the user wants the originals changed. Add `--backup-dir "<folder-outside-the-publish-folder>"` when a backup is useful.29 - Add `--all-metadata` only when the user asks to remove all removable non-rendering metadata. Preserve color profiles and functional animation data.30315. Confirm every changed file reports `PASS`. The cleaner reparses the written container and confirms that encoded PNG, JPEG, WebP, or GIF image payloads are unchanged.326. Inspect the cleaned output again when extra verification is appropriate.337. Report the number of files processed, exact output path, formats handled, and metadata removed.3435## Format Routing3637- Use the bundled script for byte-preserving PNG, JPEG/JPG, WebP, and GIF cleanup.38- For TIFF, HEIC/HEIF, AVIF, SVG, PSD, or another format, inspect available format-aware tools such as ExifTool or `c2patool`. Work on copies unless in-place replacement was requested. Verify the result with the same tool plus a decoder.39- If no safe handler is available, stop and report the unsupported format. Do not generically re-save or convert the image merely to strip metadata; that may alter pixels, animation, orientation, color, or compression.4041## Operational Rules4243- Process only images you own or are authorized to modify. Do not remove provenance metadata to misrepresent an image's origin or bypass a platform's disclosure requirements.44- Never claim a cleaned image is undetectable or guaranteed not to be classified as AI-generated. State only which explicit metadata was removed. Pixel-based classifiers may still guess.45- Preserve encoded picture data, ICC profiles, gamma/chromaticity information, JPEG color-transform markers, animation control, and other rendering-related data.46- In default mode, preserve unrelated copyright, authorship, descriptions, and location metadata unless the user requests broader removal.47- Warn when removing a whole EXIF block could also remove orientation or other co-located fields. Prefer a metadata-aware editor when selective EXIF tag deletion is possible.48- Keep backups outside the upload/publish folder so tagged originals are not selected accidentally.49- Stop on malformed containers, failed integrity validation, changed encoded-image hashes, or incomplete post-clean inspection.5051## Common Invocations5253Inspect supported images:5455```powershell56python "<skill-folder>\scripts\clean_image_metadata.py" "C:\path\images" --recursive57```5859Clean originals after explicit confirmation:6061```powershell62python "<skill-folder>\scripts\clean_image_metadata.py" "C:\path\images" --recursive --in-place63```6465Create clean copies:6667```powershell68python "<skill-folder>\scripts\clean_image_metadata.py" "C:\path\images" --recursive --output-dir "C:\path\clean-images"69```7071The bundled cleaner uses only the Python standard library.