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.
Preparation
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.
Before:
After:
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.
Support us
Winaero greatly relies on your support. You can help the site keep bringing you interesting and useful content and software by using these options:
That’s worth knowing about. I must confess to a reluctance to use the command line if a GUI is available simply because I don’t know syntax and it’s not always clear if there’s a space or a wildcard of some kind even when an article includes instructions. When I manage to get GIMP 2.10 installed, all should be well. :)
Thanks, the EXIF got stripped out of images I really had been trying hard to do with another tool that kept on failing to produce the required field restrictions or alterations, this did the trick in seconds.
So if you are here because exiftool is not cutting it, this worked for my.
Using MX Linux as a DEBIAN strain of the Linux distro.
It works – thank you!
thanks a lot, it helped me :)
One of those commands you always forget and have to use the googler to remind you what the syntax is, thanks!