exiftool
exiftool is pretty awesome!
Installation
On Linux:
sudo apt install exiftool
On MacOS:
Use
Here are commands I found useful:
Test renaming image files by date:
exiftool -d '%Y-%m-%d' '-Testname<${DateTimeOriginal}.${FileSequence;$_=sprintf("%03d", $_ )}.%le' *.*
And then to actually rename the files:
exiftool -d '%Y-%m-%d' '-Filename<${DateTimeOriginal}.${FileSequence;$_=sprintf("%03d", $_ )}.%le' *.*
To strip EXIF metadata from the image:
exiftool -all= foo.jpg
Alternatively, to remove geographical coordinates embedded in the photo:
exiftool -geotag= foo.jpg