Forum Discussion
How can I remove metadata from images?
If you want to use the command line to really cleanly and quickly remove metadata from images, the most classic method is to use exiftool.
This tool is very powerful and can handle almost all image formats, and it can be batch operated at a very fast speed!
✅ Detailed steps are here:
- Install exiftool
- Windows users can use choco install exiftool (provided that Chocolatey is installed)
- Mac users can directly use brew install exiftool (if you have Homebrew)
- Basic command: clear metadata of a single image
Open the command line and switch to the directory where the image is located, for example:
bash
cd D:\Pictures
Then enter:
bash
exiftool -all= yourphoto.jpg
This command will clear all hidden information of yourphoto.jpg and remove metadata from images cleanly!
Batch clearing: clear the entire folder at once
If you have a bunch of pictures and don't want to type them one by one, you can do this:
bash
exiftool -all= *.jpg
Or directly process a certain type, such as .png:
Super convenient, one line of command to complete batch removal of metadata from images!
Notes:
By default, exiftool will back up the original image and add an _original suffix. If you don't want to keep a backup, you can add the -overwrite_original parameter:
bash
exiftool -all= -overwrite_original *.jpg
It is recommended to back up the original image before operation to be safe.
To sum up: Using exiftool to batch remove metadata from images on the command line is clean, efficient, and fully automated, which is very suitable when you have a lot of photos to clean up!