Modern smartphones and digital cameras are able to add extra information to photos you take. Images taken with these modern devices can contain information like GPS coordinates, your camera or phone model and lots of other data. It is not visible on the photo, but accessible via the file properties dialog. In this article, we will see how to remove it under Linux.
Extra data mentioned above is called metadata. It is stored as per any of the metadata standards - EXIF, ITPC, or XMP. Metadata is commonly stored in file formats like JPEG, TIFF and some others. It can be very useful for professional photographers, because very often the metadata contains all the technical parameters of the photo, like ISO, brightness, aperture etc.
This information can be seen in Linux with many apps. Depending on your software set, there is a great chance that you have an app which can display it. For example, Ristretto and Thunar in my beloved XFCE can show this info in image properties.
The photo above is taken with a modern smartphone. As you can see, there are tons of extra parameters written to every image.
To privacy reasons, you may want to remove this information before uploading it to social media or sharing with your friends. Here is how it can be done.
To remove EXIF and other personal information from images, we need the imagemagicK package installed. Search for this app suite with your distro's package manager. Depending on your distro, the command may look as follows.
apt-get install imagemagick pacman -S imagemagick yum install imagemagick dnf install imagemagick xbps-install imagemagick
Remove Personal Information from Photos
To remove EXIF Information from photos in Linux, do the following.
- For your convenience, place all image you want to process to the single folder.
- Navigate to that folder.
- Open a new terminal and run the following command:
mogrify -strip your_filename.jpg
This will remove the meta data from a single specific file.
- To process all files at once, execute the command
mogrify -strip ./*.jpg
The EXIF info will be quickly removed.
It is worth mentioning that third-party apps can offer you more options. For example, my favorite image viewer XnView allows editing of EXIF in a useful way. Also, the recently released GIMP 2.10 app allows editings of image meta data. You might want to give it a try.