Today, thanks to the rise of social networks and the numerous options of multimedia elements, we can see how images have become one of the most used elements, millions of users take photographs of their family outings, corporate meetings and in any case event and this is uploaded to platforms such as Facebook, Twitter, Instagram, etc, and although every second this happens in the background, and without noticing it, we are violating a security breach and it is nothing more and nothing less than our private information.
This information is given thanks to a feature called EXIF which is a specification for file formats that comes by default in both digital cameras and current smartphones and that includes many details of the selected photo.
Some of the details that EXIF captures are
- The camera or device with which the photo was taken (brand, model, serial number, firmware version and more)
- Trigger parameters (aperture of diaphragm, sensitivity, focal length, white setting)
- Shooting modes (Av, Tv, Manual, with flash or without flash, etc.)
- Characteristics of the photo itself (size, color space, date and time)
- Configurable device parameters
- Information positioning, and many more.
Metadata is commonly stored in file formats such as JPEG, TIFF. A good security practice is to edit this information, at least the most delicate, or erase it all and thus prevent some type of attacker from accessing this information and misusing it.
Step 1
To perform the EXIF deletion process, we are going to use a package called imagemagick in the system and for this we execute one of the following lines based on the distribution used:
apt-get install imagemagickpacman -S imagemagickyum install imagemagickdnf install imagemagickxbps-install imagemagick
In our case we use Ubuntu 18.04 so we execute the following command:
sudo apt install imagemagick
Step 2
Once installed we will be ready to proceed with EXIF deletion of the selected image. Before deleting this information, we can right click on the image, select the Properties option and in the Image tab we will see details such as:
- Brand and model of the device used
- Date and time at which the image was taken
Step 3
Now, we will execute the following command to delete the EXIF information of the selected image:
mogrify -strip "Image.jpg"
Step 4
Now, if we go back to the image properties and in the Image tab we can see that only the image dimension will be reflected:
That simple we can erase this information in the photographs of Linux.