remove exif data on MacOS

I was look at how to remove exif data from photos I had copied to my Mac. I used AppleScript to achieve this:

— Select images to remove EXIF data
set imageFiles to choose file with prompt "Select images to remove EXIF data" of type {"public.image"} with multiple selections allowed
— Loop through each selected image
repeat with imageFile in imageFiles
set imagePath to POSIX path of imageFile
— Create a backup copy (optional)
do shell script "cp " & quoted form of imagePath & " " & quoted form of imagePath & ".backup"
— Remove metadata using sips
do shell script "sips -s formatOptions none " & quoted form of imagePath
end repeat
display dialog "EXIF data removed from selected images." buttons {"OK"} default button "OK"

To use this:

  1. Open Script Editor on your Mac (found in Applications > Utilities).
  2. Paste the script
  3. Hit the run button

This script lets you select one or more images, uses the sips command with the -s formatOptions none option to remove the metadata. It makes a backup copy of the image with .backup extension.

Leave a comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.