10

Whenever I share my photographs, I also share lots of information that I do not want to pass on:

  • specific camera model that the photo was taken with
  • exposure time
  • focal ratio
  • ...

How can I remove all those metadata for sharing?

I'm particularly looking for solutions for Max OS X.

7
  • 1
    Basically the answers to What's a good batch-mode EXIF data editor? apply. I use jhead, which can do coarse-grained removal of all metadata and which works on many operating systems.
    – mattdm
    Apr 21 '12 at 11:37
  • (While technically a duplicate, this is still a good question since it's such an important concern.)
    – mattdm
    Apr 21 '12 at 11:42
  • 1
    @mattdm - duplicates can be good as they provide a different route to the answer
    – ChrisF
    Apr 21 '12 at 11:56
  • @mattdm Thanks for the link! I did not know that such metadata is stored as EXIF files. Both of those tools are command line based which I do not prefer, but can accept. How can I use jhead to remove all metadata at once?
    – user9426
    Apr 21 '12 at 11:59
  • 1
    jhead -purejpg will delete all metadata, by the way.
    – mattdm
    Apr 21 '12 at 12:16
6

nconvert is a fantastic tool to convert and manipulate images. It is available for a huge number of platforms in cluding Mac OS X and some plaforms I thought were long gone :)

To wipe all metadata you have to use the rmeta option, as in:

nconvert -rmeta DSCN0001.JPG

There is a small catch with all such operations depending on your camera. When you take photos in portrait orientation (the long side being vertical), some cameras create a JPEG with the rotated dimensions and others simply flag the jpeg as being rotated. In the latter case, removing all metadata will make all images appear in landscape orientation. nconvert provides an easy fix for this:

nconvert -jpegtrans exif DSCN0001.JPG

...which you have to do before removing the metadata but you can combine into one operation as in:

nconvert -jpegtrans exif -rmeta DSCN0001.JPG

PS: If you use Lightroom to export your images before publication and enable the option Minimize embdeded metadata, your images will be correctly oriented and stripped of metadata except for copyright information which is something you may want to keep embedded anyways.

4
  • Thanks, this is awesome! I'm just worried about why first command resulted in the image size dropping from 5.6 MB to 868 KB.
    – user9426
    Apr 21 '12 at 13:32
  • 1
    That's a whole lot of metadata! :) There is an optional quality argument which you can specify as a value between 0 and 100. 100 is the best. 90 is good and 85 is reasonable but I do not go any lower. Just specify it as -q 95 for example. Try it with 100 too.
    – Itai
    Apr 21 '12 at 18:16
  • 1
    If it's going from that big to that small, something more than metadata must be lost. The default must be to recompress.
    – mattdm
    Apr 21 '12 at 19:52
  • Indeed, it is surprising. My version has the default to 100 (as specified in the docs) but maybe the Mac version is different (I'm on Linux).
    – Itai
    Apr 21 '12 at 23:49
8

Imagemagick supports Unix, Mac OS X, Windows...

You can delete EXIF info using mogrify:

mogrify -strip *.jpg
1
  • Also, if you resize with --thumb (even if the target size is larger than a normal "thumbnail") it will strip metadata as well. Handy for web use.
    – mattdm
    Apr 21 '12 at 18:57
2

PNG files don't contain EXIF data so if you save as PNG first and then as JPEG that will remove all EXIF information with zero impact on image quality as PNG files use lossless compression. The advantage to this is that it can be done with almost any image editor on any platform.

PNG files have their own metadata fields so it would theoretically be possible for an image editor to extract the EXIF information and insert it into custom fields within the PNG but I've never seen one that did.

2

Another command-line tool that can do this is exiftool, using the option -all=. Here's an example:

exiftool -all= image.jpg

You can wildcard all files in a directory using the normal Unix-style shell globbing:

exiftool -all= *.jpg
2

Almost a decade late with this answer, but Photoshop's 'Export as…' [the replacement for 'Save for Web'] deletes almost all metadata with little option to keep it; only copyright & contact details remain, if selected.

enter image description here

In fact, to preserve metadata, you must use the Save for Web (Legacy) function, which still exists as of Ps 2020.

enter image description here

The key commands may be my own, not defaults.

1

For Windows, there's a free command-line utility called PureJPEG that can be used to remove all information from a JPEG file (or a directory and its subdirectories full of files) not necessary for displaying the image. It's a one-trick pony, but its one trick appears to be exactly the one you want to see.

1
  • I use PureJPEG, too. That's not a Mac solution, though.
    – Eric
    Apr 21 '12 at 13:32
0

I just found a program that has an actual gui and works great. You just drag images onto it and it deletes all the data.

http://codewelt.com/stripper

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy