In ImageMagick:
convertsave the result to a given (new) filemogrifyis the same asconvertbut it performs processing inplace (the input files are overwritten)
Strip metadata from jpg file:
mogrify -strip f.jpg
Rotate according the metadata, then strip:
mogrify -auto-orient -strip f.jpg
Find jpg and jpeg images, apply orientation from EXIF, remove metadata and resize to 1920 on the longest side
preserving the aspect ratio and save to the same files:
find . -name "*.jp*g" -exec mogrify -auto-orient -strip -resize "1920x1920" {} \;
See also