Skip to content

Instantly share code, notes, and snippets.

@axelsimon
Last active February 28, 2020 13:59
Show Gist options
  • Save axelsimon/c40044747310d28954b780bce5fc20da to your computer and use it in GitHub Desktop.
Save axelsimon/c40044747310d28954b780bce5fc20da to your computer and use it in GitHub Desktop.
Quick wiping of picture metada

Removing most identifiable metada (geodata, make and model of the camera):

A short reminder on useful exiftool commands.

for i in *.jpg; do echo "dealing with $i"; exiftool -geotag= -make= -model= -software= "$i"; done without using wildcards.
Or to use wildcards: exiftool -geotag= -make= -model= *.jpg *.jpeg *.JPEG

Doing it on directly on a entire directory:

exiftool -geotag= -make= -model= SOME_DIRECTORY

Doing it recursively on subdirectories too:

exiftool -r -geotag= -make= -model= SOME_DIRECTORY

Adding a -r option allows to recursively process subdirectories. This will process any type of file that is writable by ExifTool, but if you only want to process jpeg images, add "-ext jpg" and maybe "-ext jpeg" (ext is not case sensitive), as in:
exiftool -r -geotag= -make= -model= -software= -ext jpg -ext jpeg SOME_DIRECTORY

Watch out

Some cameras may store more easily identfiable data in other EXIF tags (gps=). Also, by default exiftool will create copies and leave originals untouched. So either make sure to sare the copies or to delete the originals. Or use exiftool's -overwrite_original option to avoid this.

exiftool -r -overwrite_original -P -geotag= -make= -model= -software= -ext jpg -ext jpeg *

-P to preserve date/time of original file(s)

Acknowledgements

Lots of this taken from this article: http://www.linux-magazine.com/Online/Blogs/Productivity-Sauce/Remove-EXIF-Metadata-from-Photos-with-exiftool

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment