Which might be useful. Compared with diff -y <(exiftool wMogrify.jpg) <(exiftool wExiftool.jpg)
Remove EXIF data is not the same as anonymize: -strip will recompress the image. This might be a good thing: The same software that take the photo (or other) could hide sensitive information (which may be encrypted) inside of ordinary image data (steganography). I'm not sure if the recompression will always remove everything (probably not). To avoid this recompresion you can use jpegtran:
Metadata Cleaner: Desktop app to view and clean metadata in files (not only images).
If you prefer Exiftool, you might find useful creating an alias to exiftool -all= *.jpg && rm *original, or with -overwrite_original option. To remove only GPS data use exiftool -gps:all= -xmp:geotag= *.jpg. Use an updated version: CVE-2021-22204.
I wish to add mat2 which support not only images. It's recommended by privacyguides.org (formerly known as privacytools.io) community.
MAT2 is free software, which allows the removal of metadata of image,
audio, torrent, and document file types. It provides both a command
line tool and a graphical user interface via an extension for
Nautilus, the default file manager of GNOME.
and
mat2 is a metadata removal tool, supporting a wide range of commonly
used file formats, written in python3: at its core, it's a library,
used by an eponymous command-line interface, as well as several file
manager extensions.
Install exiftool:
To read photo metadata:
To erase photo metadata:
Before:
After:
References:
Imagemagick
Instead of Exiftool, to handle Exif metadata (IPTC, XMP and ICC image metadata also) I found Imagemagick more useful and command easier to remember:
To read
To remove
With
imagemagick
package installed you can do this (not only for JPEGs):From manual:
Since IMv7
magick identify/mogrify/...
it's used instead (source).AFAIK the only difference with exiftool is that
mogrify
won't remove this metadata:Which might be useful. Compared with
diff -y <(exiftool wMogrify.jpg) <(exiftool wExiftool.jpg)
Remove EXIF data is not the same as anonymize:
-strip
will recompress the image. This might be a good thing: The same software that take the photo (or other) could hide sensitive information (which may be encrypted) inside of ordinary image data (steganography). I'm not sure if the recompression will always remove everything (probably not). To avoid this recompresion you can use jpegtran:Also, to avoid losing color profile (ICC metadata, which causes richer colors[citation needed]):
You might ask yourself if these costs are noticeable or relevant in your case.
Another tool about steganography on images is steghide.
Other tools and notes
--list
). It's recommended by privacyguides.org.jhead
(only for JPEGs) and exiv2 (man; suggested on Wikipedia).exiftool -all= *.jpg && rm *original
, or with-overwrite_original
option. To remove only GPS data useexiftool -gps:all= -xmp:geotag= *.jpg
. Use an updated version: CVE-2021-22204.webp
package provideswebpmux
command, which manage XMP/EXIF metadata and ICC profile.See also
To remove then change a single field we can use this command:
Reference
I wish to add
mat2
which support not only images. It's recommended by privacyguides.org (formerly known as privacytools.io) community.and
in-place purge of metadata
There are a number of tools for this, as others have listed. One more that I found on my system is
exiv2
.Install:
sudo apt-get install exiv2
View:
exiv2 myimage.jpg
Remove:
exiv2 rm myimage.jpg
Additional options are listed in the man page.