8

For a while now I have used exiftool to strip away unnecessary metadata from jpg files (and to add copyright information) before uploading them:

exiftool -all= image.jpg

However, today I noticed that this can damage the image when my editing software embeds additional color information into the metadata (see for example this article).

Distorted and original image.

Left is the damaged image, and to the right the original right out of the raw developer.

My question now is, which metatags are safe to strip and which are essential to keep? For example, based on the image ICC tags (i.e. -icc_profile:all) shouldn't be stripped if they exist? (Possible duplicate of this question.)

0
9
exiftool -all= -TagsFromFile @ -ColorSpaceTags DIRorFILES

This command will remove nearly all metadata but retain ExifIFD:ColorSpace, ExifIFD:Gamma, InteropIFD:InteropIndex, and ICC_Profile tags. ColorSpaceTags is an ExifTool shortcut for “standard tags which carry color space information” (added in ver 9.51).

There are some caveats. -all= will not delete Adobe APP14 block in jpegs, as this may affect the colors of the image. No personal info is held in this block, so there is normally no need to delete it. It will also not delete Exif tags in a tiff or tiff based file such as Nikon or Canon raw images (NEF or CR2), as the image data itself is contained in the Exif block. -CommonIFD0= can be added to the command to clear out most common Exif tags in these images (see ExifTool Shortcut tags for full list of tags contained in the CommonIFD0 shortcut).

1
  • It may be desirable to additionally pass -Orientation in order to preserve any rotation information. – Andrew Marshall Jun 6 at 13:59
1

I don't recommend you to remove metadata from your original images. It make sense to do this for images that you want to share or publish, during the export stage for the next reasons:

  • You might take a look at the metadata of some of your beautiful images later, to see their exposure, GPS info, etc...
  • Like Paul said, images with the sRGB profile will be 99.9% correctly viewed on any device or web-browser while images with another profiles can be displayed unpredictable for other people.
  • Your images can be optimized for better and faster viewing when exporting
  • You can do a lot of other post-processing things with your images during the export like sharpening, applying watermarks, etc...

So my suggestion is: don't remove metadata from your images that is value for you. And instead use a photo management software to export your images to a right format, applies your profile, strip metadata, assign your copyrights and contact info and add your watermarks.

1
  • 6
    I remove at least all the XMP data because that contributes nothing to the image, and is almost a privacy concern to me. – Jens Nov 3 '14 at 18:33

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.