Photo MetaClean
Remove sensitive metadata from JPEG and PNG images before you share them. One command, three modes.
Why
Every photo taken with a smartphone quietly carries GPS coordinates, camera model, software and exact timestamps in EXIF. When you email it, upload it to a client portal, or post it publicly, that data travels with the file — a geotag can reveal your home, your office, or a private shoot location. Photo MetaClean strips it at the byte level: no re-encode, no quality loss, no cloud upload.
Install & Run
Zero dependencies — Python standard library only.
# Inspect what's hidden in an image
python -m tools.photo-metaclean photo.jpg
# See the full metadata list (GPS, camera, timestamps)
python -m tools.photo-metaclean photo.jpg --verbose
# Write a sanitized copy
python -m tools.photo-metaclean photo.jpg --clean
# -> photo_clean.jpg
# Overwrite the original
python -m tools.photo-metaclean photo.jpg --in-place
# Verify the tool works on your machine
python -m tools.photo-metaclean --self-check
Works with multiple files at once: python -m tools.photo-metaclean *.jpg --clean.
Options
| Flag | Description |
|---|---|
--clean |
Write cleaned copy as <name>_clean.<ext> |
--in-place |
Overwrite the original file after cleaning |
--verbose |
List all metadata found before cleaning |
--self-check |
Run a built-in correctness test |
Why the byte-level strip
Most editors "remove metadata" by re-encoding the image — losing quality and, in some cases, leaving thumbnail or maker-note residue. Photo MetaClean rewrites the JPEG/PNG container and drops the metadata segments themselves:
- JPEG: APP1 (EXIF and XMP), APP13 (IPTC/Photoshop) and COM comments. JFIF, ICC color profile and Adobe APP14 are preserved. Pixel data (SOF/SOS/entropy) is copied byte-for-byte.
- PNG:
tEXt,zTXt,iTXt,tIMEandeXIfchunks removed. Image data (IDAT) untouched.
No re-encode — an 8 MB photo stays an 8 MB photo, only lighter in data.
Support the Project
Photo MetaClean is free and open source. Like it?
- Get your site audited — €49 — I run the audit and send you the fixes
- Buy me a coffee — one-time support
Report a bug
Found a bug or something weird? Run:
python -m tools.photo-metaclean --report
This opens a pre-filled email. Send it and I'll get notified automatically.
You can also email danyblitz@googlemail.com directly. Use the subject format:
[TOOL-REPORT] photo-metaclean <what happened>
Attach the image or log output if you have one.
License
MIT
Metadata
Release files for photo-metaclean 1.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| photo_metaclean-1.1.0.tar.gz | 9.2 kB | Without provenance | Details for photo_metaclean-1.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| photo_metaclean-1.1.0-py3-none-any.whl | Python 3 | none | any | Details for photo_metaclean-1.1.0-py3-none-any.whl |
Total release size: 18.3 kB
Release files / photo_metaclean-1.1.0.tar.gz
| Download URL | photo_metaclean-1.1.0.tar.gz |
|---|---|
| Size | 9.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a33fe018d5599911ebb66e45e4da93c13d3e25fc7ce41cb951346ec1839c27b2
|
|
BLAKE2b-256 checksum How to use checksums |
489ffe898cbf64ca8245dad882a3502a5da51b881ba0694e7913409504bd4bab
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Release files / photo_metaclean-1.1.0-py3-none-any.whl
| Download URL | photo_metaclean-1.1.0-py3-none-any.whl |
|---|---|
| Size | 9.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
35ab9b2f8bdbf2ea78bd36ed88d809834647eb5c67e7e18e0e0c2370d636f378
|
|
BLAKE2b-256 checksum How to use checksums |
c00321d925882d2b8d34c8e7842d7b7b6ab93fcd6cde070b35e13490e6e8e3ef
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Security for photo-metaclean 1.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.