How to Strip Out Metadata from Photos on Mac

There are several options for removing image metadata for privacy on Mac, from standalone apps to highly versatile command-line tools. Here’s a rundown of some of the best options.

Screenshot of ImageOptim preferences for removing metadata from images
Text & Photos By David Coleman
Last Revised & Updated:
Filed Under: Workflow

I MAY get commissions for purchases made through links in this post.

Image files often come with a bunch of information embedded in their metadata fields. Most of the time, it’s invisible until you go looking for it. Some of the obvious types of information include the kind of camera used, exposure information like shutter speed, and time and date.

But the information embedded in the file can often come with far more than that. Smartphones are particularly bad offenders in this regard, because they’ll often save location information into the metadata by default. Some larger cameras can also do this on-demand.

To be clear, information like that can be incredibly useful in the right context. I save location information in many of the hundreds of thousands of photos I have in my archive. It’s useful for me to sort them by location or adds helpful context to the photo. But that’s not the same thing as wanting that information out in the wild publicly. I often save location information to family photos, but that doesn’t mean I necessarily want the GPS location of where the photo was taken available if I happen to share any of those shots.

If you’re using image processing apps like Lightroom or Capture One to manage your images, you might also have information like client addresses or stock agency keywords.

So you might want to remove all of that information for privacy reasons. There’s no need to include the GPS location of your home, for example. And you certainly don’t want client addresses or notes going out into wider circulation.

There are a number of ways to tackle this on Mac. Standalone apps like ImageOptim are quick and easy to use. If you’re using Lightroom or Capture One, you can export with only copyright metadata. And there are some really useful and powerful command-line options that can be combined with other tools like watched folders or other processing to make some very helpful tools in a photography workflow.

Standalone Apps

There are relatively few Mac apps that will do this. Even some of the usual batch image processing apps don’t include robust metadata tools. And one of the tools I used to recommend for this appears to no longer be available.

But here are a couple of good options, one free and one paid.

ImageOptim

ImageOptim is a free GUI tool by Kornel Lesiński. Or more accurately, a toolbox of various tools. It’s objective is to optimize images to make them smaller and faster to load. But a useful side-effect of some of those processes is to remove image metadata.

NB: ImageOptim only works on JPG and PNG files.

ImageOptim works as a drop panel, so once you’ve chosen what optimizations you want to apply, it’s very simple and quick to use.

You can find the metadata stripping options in Preferences > General.

Screenshot of ImageOptim preferences for removing metadata from images

ImageOptim is free. You can download it here.

Squash

Squash is a batch photo editor. It’s a paid app; you can find it here.

Squash is designed as a Swiss-Army Knife for photo batch processing, so it can also do things like resizing, adding watermarks, compressing, and so on as part of the process. But one of those tools is stripping out image metadata.

The default behavior is to remove metadata, but you can optionally choose to preserve it if you wish.

Squash is quite a slick app and worth a look if you’re regularly working with batches of photos.

Command-Line Tools for Metadata Removal on Mac

Command-line tools can be a bit intimidating to use at first, but the come with an incredible amount of versatility and power. And you can be very precise about which fields to target or even add back in certain fields (such as copyright and credit).

Of these, the gold standard is ExifTool, and I’ve included that below. If you already have that installed, as I do, that’s the one I’d recommend going with. But SIPS and ImageMagick also have their virtues, especially if you don’t have or don’t want to install ExifTool or want simpler ways to combine metadata removal with other image processing.

I’ve included some example commands for each below, but a virtue of these is that there are multiple ways to customize and refine what they do.

SIPS

SIPS is a command-line toolkit for working with images that’s already built into macOS. So there’s nothing to install–it’s already there, just sitting quietly in the Mac operating system. It’s basically like a lightweight version of ImageMagick.

While SIPS does have the facility to save files without metadata, it’s not always as thorough as some of the other options here. But I’m including it here because it comes built-in to macOS and doesn’t require any installation. So it’s an especially good option for getting up and running quickly. It also works very well with Automator and Folder Actions.

To remove metadata from an image using SIPS, you can use the following command:

sips -s formatOptions none imagefile.jpg --out newimagefile.jpg

The formatOptions none setting tells SIPS to save the image without any metadata. Replace imagefile.jpg with the path to your original image and newimagefile.jpg with the desired output filename.

If you want to remove metadata from multiple images at once, you could use a loop like this:

mkdir -p "Stripped"
for file in *.jpg; do
    # Check if the file exists
    if [ -e "$file" ]; then
        # Use sips to strip metadata and save in the "Stripped" folder
        sips -s formatOptions none "$file" --out "Stripped/$file"
        echo "Stripped metadata from $file"
    else
        echo "$file not found"
    fi
done

Please note, while the -s formatOptions none command is intended to prevent writing metadata to the new file, it doesn’t always remove all metadata from the image file. To ensure complete removal of all metadata, you might need to use a more specialized tool like exiftool, which is a powerful command-line utility for reading, writing, and editing meta information in image files.

ImageMagick

ImageMagick’s strength is in its image processing and manipulation. It’s superb for converting between image types, encoding different styles, adding borders, resizing, and all sorts of image editing tasks. It also has basic metadata support, although that’s not where it’s focus is.

But a virtue of using ImageMagick for this is if you’re looking to do multiple tasks to prepare images for sharing. For instance, you might also want to resize the image, convert it to a more compressed JPG, and add a watermark, as well as removing all the metadata. With a properly crafted command, you can do all of that at once. And then combine that with tools like Automator workflows or Folder Actions, and you can also do things like automatically run the process and even add the images as attachments to emails or upload them to a designated server online. 1

ImageMagick is not installed on the Mac by default, but it’s simple to set up with a few lines of command-line code thanks to the existence of Homebrew, which acts as an intermediary to make the installation smooth. I have a separate post on how to install ImageMagic on Mac, and it’s really very easy once you get past any hesitation in using Terminal and the command-line.

I have a more detailed post on how to remove image metadata with ImageMagick that includes step-by-step guide to creating a reusable drop folder so you don’t need to be messing with command-line code every time. But here’s the quick version.

The basic command is:

magick mogrify -strip input.jpg

To remove metadata from all images in a directory (and overwrite the input files):

for file in *.{jpg,jpeg,gif,webp,heic,heif}; do magick mogrify -strip "$file"; done

This particular version specifies common image file types, but you can modify it to be more generic if you prefer.

Note that ImageMagick has two related commands here that can be used in different circumstances: mogrify and convert. Basically, mogrify is in-place processing, meaning it works directly on the input files and overwrites them. By contrast, convert creates new versions and saves them as separate files.

The command convert -strip image.jpg output.jpg will create a new image with the metadata removed, while mogrify -strip image.jpg will remove metadata from the image in place​​ and overwrite the input file.

ExifTool

ExifTool is the gold standard here. It was developed by Phil Harvey and has been a staple of metadata wrangling for years now. More than a few of the image metadata tools out there use ExifTool under the hood.

If you really want the metadata gone and need to perform this task regularly, it’s well worth taking a few minutes to install it and set up some reusable drop folders. Again, it’s really not as hard as it might seem at first.

I have a more detailed post on how to remove image metadata with ExifTool, but here’s the quick version.

The basic command is:

exiftool -all= -overwrite_original input.jpg

To process (and overwrite) all the images in a directory, you can use (you can copy and paste this–you don’t need to retype it manually):

for file in *; do
    if exiftool -q -if "$file" >/dev/null; then
        exiftool -all= -overwrite_original "$file"
    fi
done

It’s also possible to set up commands that will strip out the metadata and then re-add copyright and credit information. You can also set it up as a drop folder for repeated use.

Other Options

Lightroom Classic. If you’re processing your images in Lightroom Classic, you can minimize the metadata that’s embedded into exported images by choosing the “Copyright Only” option or one of the sub-options if you want to be more selective about.

Capture One. With Capture One, you can deselect all the groups you do not want to be included in output files.

No Longer Available

  • I previously had been recommending EXIFPurge, a simple and straightforward app specifically designed to remove image metadata. But it appears to no longer be available. So I’ve removed it from the list.

Things Worth Knowing

  • Most of these options will also remove any embedded ICC color profiles. If you’re sharing this the photos in the web and are generally using an sRGB color profile, you shouldn’t run into any trouble. That’s because most browsers and apps assume an sRGB profile if there isn’t one in the file. But if you’re using a different color profile in your color management workflow, you might end up with some odd display issues such as the images appearing flat or colors shifting. In that case, you might want to use one of the targeted options to preserve the color profile in the file while removing other metadata.
  1. To be clear, you can do quite a few of these tasks with SIPS too. ImageMagick is just more powerful, though, which means even more granular control and more things you can do.[]
Profile photo of David Coleman | Have Camera Will Travel | Washington DC-based Professional Photographer

Text & Photos by David Coleman

I'm a professional photographer based in Washington DC. Seven continents, up mountains, underwater, and a bunch of places in between. I've been shooting for 30+ years, and my my photos and time-lapse videos have appeared in a bunch of different publications from major newspapers to magazines and books, billboards, TV shows, professional sports stadiums, museums, and even massive architectural scrims covering world-famous buildings while they're being renovated. You can see some of my travel photography here and here.

Leave a Comment