Skip to content

Instantly share code, notes, and snippets.

@brews
Created August 10, 2021 05:02
Show Gist options
  • Save brews/fb2903c8c4d417a837b3c9147a22550c to your computer and use it in GitHub Desktop.
Save brews/fb2903c8c4d417a837b3c9147a22550c to your computer and use it in GitHub Desktop.
Bash script to remove EXIF metadata from IMG_*.jpg files in directory. Write as 70% quality *_clean.jpg in same directory.
#! /usr/bin/env bash
# Remove EXIF metadata from IMG_*.jpg files in directory.
# Write as 70% *_clean.jpg in same directory.
for f in IMG_*.jpg
do
echo "Processing $f"
echo "Writing ${f%.*}_clean.jpg"
convert "${f}" -quality 70% -strip "${f%.*}_clean.jpg"
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment