https://github.com/per2jensen/scrubexif
Lightweight, Dockerized EXIF cleaner for fast publishing of JPEG photos without leaking sensitive metadata
https://github.com/per2jensen/scrubexif
docker exif image-scrubber metadata-cleaner photo photography-tool privacy
Last synced: about 1 year ago
JSON representation
Lightweight, Dockerized EXIF cleaner for fast publishing of JPEG photos without leaking sensitive metadata
- Host: GitHub
- URL: https://github.com/per2jensen/scrubexif
- Owner: per2jensen
- License: gpl-3.0
- Created: 2025-06-29T09:45:19.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-06-29T19:49:35.000Z (about 1 year ago)
- Last Synced: 2025-06-29T20:32:47.343Z (about 1 year ago)
- Topics: docker, exif, image-scrubber, metadata-cleaner, photo, photography-tool, privacy
- Language: Makefile
- Homepage:
- Size: 22.5 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# scrubexif
π§Ό `scrubexif` is a lightweight, Dockerized EXIF cleaner designed for fast publishing of JPEG photos without leaking sensitive metadata.
It removes most embedded EXIF, IPTC, and XMP data while preserving useful tags like exposure settings, lens information, and author credits β ideal for privacy-conscious photographers who still want to share meaningful technical info.
π¦ **GitHub**: [per2jensen/scrubexif](https://github.com/per2jensen/scrubexif)
---
## π Quick Start
There are **two modes**:
### β
Manual mode (default)
Manually scrub one or more `.jpg` / `.jpeg` files from the current directory.
#### Scrub specific files
```bash
docker run -it --rm -v "$PWD:/photos" per2jensen/scrubexif "file1.jpg" "file2.jpeg"
```
#### Scrub all JPEGs in current directory
```bash
docker run -it --rm -v "$PWD:/photos" per2jensen/scrubexif
```
#### Recursively scrub nested folders
```bash
docker run -it --rm -v "$PWD:/photos" per2jensen/scrubexif -r
```
---
### π€ Auto mode (`--from-input`)
Scrubs everything in a predefined input directory and saves output to another β useful for batch processing.
You **must** mount three volumes:
- `/photos/input` β input directory (e.g. `$PWD/input`)
- `/photos/output` β scrubbed files saved here
- `/photos/processed` β originals are moved here (or deleted if `--delete-original` is used)
#### Example:
```bash
docker run -it --rm \
-v "$PWD/input:/photos/input" \
-v "$PWD/output:/photos/output" \
-v "$PWD/processed:/photos/processed" \
per2jensen/scrubexif --from-input
```
Optional flags:
- `--delete-original` β Delete originals instead of moving them
- `--dry-run` β Show what would be scrubbed, but donβt write files
---
## π§ Options (Manual mode)
The container accepts:
- **Filenames**: one or more `.jpg` or `.jpeg` file names
- `-r`, `--recursive`: Recursively scrub `/photos` and all subfolders
- `--dry-run`: Show what would be scrubbed, without modifying files
**Examples:**
Scrub all `.jpg` files in subdirectories:
```bash
docker run -it --rm -v "$PWD:/photos" per2jensen/scrubexif -r
```
Dry-run (preview only):
```bash
docker run -it --rm -v "$PWD:/photos" per2jensen/scrubexif --dry-run
```
Mix recursion and dry-run:
```bash
docker run -it --rm -v "$PWD:/photos" per2jensen/scrubexif -r --dry-run
```
If no arguments are provided, it defaults to scanning `/photos` for JPEGs.
---
## β
Features
- Case insensitive, works on .jpg, .JPG, .jpeg & .JPEG
- Removes most EXIF, IPTC, and XMP metadata
- **Preserves** useful photography tags:
- `ExposureTime`, `FNumber`, `ISO`
- `LensModel`, `FocalLength`
- `Artist`, `Copyright`
- Based on [ExifTool](https://exiftool.org/) inside a minimal Ubuntu base image
- Docker-friendly for pipelines and automation
---
## π§Ό What It Cleans
The tool removes:
- GPS location data
- Camera serial numbers
- Software version strings
- Embedded thumbnails
- XMP/IPTC descriptive metadata
- MakerNotes (where safely possible)
It **preserves** key tags important for photographers and viewers.
---
## π³ Docker Image
Pull the image:
```bash
docker pull per2jensen/scrubexif
```
Use it to clean all .jpg and .jpeg in `$PWD`:
```bash
docker run -it --rm -v "$PWD:/photos" per2jensen/scrubexif
```
Inspect version and help:
```bash
docker run --rm per2jensen/scrubexif --version
docker run --rm per2jensen/scrubexif --help
```
---
## π Viewing Metadata
To inspect the metadata of an image before/after scrubbing:
```bash
exiftool "image.jpg"
```
Inside the container (optional):
```bash
docker run --rm -v "$PWD:/photos" per2jensen/scrubexif exiftool "image.jpg"
```
---
## π¦ Inspecting the Image Itself
To view embedded labels and metadata:
```bash
docker inspect per2jensen/scrubexif:latest | jq '.[0].Config.Labels'
```
You can also check the digest and ID:
```bash
docker image inspect per2jensen/scrubexif --format '{{.RepoDigests}}'
```
---
## π Example Integration
This image is ideal for:
- Web galleries
- Dog show photo sharing
- Social media publishing
- Backup pipelines before upload
- Static site generators like Hugo/Jekyll
---
## π§ Build Locally (Optional)
```bash
docker build -t scrubexif .
```
---
## βοΈ License
Licensed under the GNU General Public License v3.0 or later
See the `LICENSE` file in this repository.
---
## π Related Tools
πΈ [file-manager-scripts](https://github.com/per2jensen/file-manager-scripts) β Nautilus context menu integrations
πΈ image-scrubber β Browser-based interactive metadata removal
πΈ jpg-exif-scrubber β Python tool that strips all metadata (no preservation)
`scrubexif` focuses on **automated, container-friendly workflows** with **safe defaults** for photographers.
---
## π¬ Feedback
Suggestions, issues, or pull requests are always welcome.
Maintained by **Per Jensen**
---
## π Project Homepage
Source code, issues, and Dockerfile available on GitHub:
π [https://github.com/per2jensen/scrubexif](https://github.com/per2jensen/scrubexif)