How to remove EXIF Data

Now that I explained you what EXIF Data is and showed you how you can view EXIF on JPEG files, I will now show you how to remove EXIF Data completely or partially from JPEG files.

1) EXIF Data and XMP Data explained

There are multiple reasons why you might want to remove EXIF fully or partially from files:
a) You are posting an image to a low-bandwidth site and need to keep the file sizes to a minimum
b) You want to protect your work and photographic style
c) You want to remove unnecessary junk from JPEG files to keep the file smaller, yet need to retain important EXIF Data such as shutter speed, aperture and ISO.

I personally use the last reason to keep my files a little smaller and to make sure that unnecessary junk does not get written into my JPEG files.

Let me first explain what EXIF Data is written into a file. If you use Adobe products such as Photoshop or Lightroom for manipulating your images, EXIF Data typically consists of three parts: the normal EXIF Data that contains your camera settings, the XMP Data that contains post-processing steps you took before the image was exported and a thumbnail of the image. Here is a short excerpt from the above URL:

XMP also defines particular schemas for basic properties useful for recording the history of a resource as it passes through multiple processing steps, from being photographed, scanned, or authored as text, through photo editing steps (such as cropping or color adjustment), to assembly into a final image. XMP allows each software program or device along the way to add its own information to a digital resource, which can then be retained in the final digital file.

Is this good or bad? Having XMP in your original image files is definitely good, since it retains your settings. However, why would you want to keep all of it in exported images?

Let’s look at a sample image that contains XMP Data:

Remove EXIF Data

I opened an image using an ASCII text editor and look at what’s in that file – that’s in addition to the EXIF Data that is already stored in the file header. Scrolling down, I could see everything from White Balance to Saturation and Hue adjustments I used in Lightroom before exporting the image. Worst of all, the file even included ALL of the image history, including what I did in Photoshop and how many times the image was saved!

Take a look at the yellow area highlighted in this screenshot:

Remove EXIF Data2

I applied Tone Curve to my image and as you can see, the history is right there. Imagine how large your files can grow if you work on them multiple times! In addition, why would you want to preserve the thumbnail of an image that is being exported for the web?

2) Removing unnecessary EXIF and XMP Data

Let’s now talk about how you can either completely or partially remove both EXIF and XMP Data from an image. There are multiple ways to remove EXIF and XMP data from JPEG files – you can either remove EXIF data completely, or you can choose what to keep, while deleting specifically what you want.

2.1) How to remove EXIF Data from an image file completely

The easiest way to remove EXIF and XMP Data from an image without involving third party software is to either do it in Photoshop or in Lightroom. In Photoshop, simply go to File->Save for Web & Devices and make sure that “Metadata” is set to “None”:

Remove EXIF Data3

Once you save the file, all EXIF and XMP Data will be gone!

You can achieve a similar result in Lightroom by checking “Minimize Embedded Metadata” while exporting an image:

Remove EXIF Data4

However, this only does what it says – it minimizes EXIF metadata and does not completely remove it. Most of the EXIF Data such as Shutter Speed, Aperture, ISO and XMP Data will be gone, but some of it such as copyright info, your image dimensions and image thumbnail will be kept. I’m not sure why Adobe chose to do this, as I find this feature useless. It would have been much better if there was an option to completely remove metadata rather than to “minimize” it.

There is one more way to remove EXIF Data from files completely, but you would need to get Phil Harvey’s “ExifTool“. Download the executable file, then use the following command prompt:

exiftool -all= SourceFile.jpg

Obviously, replace SourceFile.jpg with the name of the JPEG file you want EXIF Data deleted from. All metadata, including the image thumbnail will be stripped from the file.

2.2) How to selectively delete EXIF Data from images

This part is for those like me, who like to keep important EXIF Data in their images, but want to get rid of all other junk such as XMP Data and image thumbnails from their images. There are two ways of doing this – from Lightroom directly, or from a command prompt. I personally like to do it directly from Lightroom, because it saves me a lot of time. If you already have a bunch of exported files, it might be easier to just run the tool from the command prompt.

First, download ExifTool, if you haven’t done it already. Create a folder called “ExifTool” inside “C:\Program Files (x86)” on 64 bit systems and “C:\Program Files” on 32 bit systems and put the executable “exiftool.exe” into that folder. On my 64 bit Windows 7 system, the full path to the executable file is “C:\Program Files (x86)\ExifTool\exiftool.exe”. You can save it elsewhere, if you want to – I just personally prefer to keep it in program files folder. Then, go ahead and create a text file in notepad and copy-paste the following into it:

exiftool -overwrite_original ^
-XMP:All= ^
-IPTC:Keywords= ^
-ThumbnailImage= ^
%*

Now save the file as “RemoveJunkEXIF.bat” in the same folder where you saved the exiftool executable. You should now have two files in that folder. So, what does the above batch file do? It basically calls exiftool, removes all XMP Data, IPTC Keywords and image thumbnail from your file, while keeping the rest of the EXIF Data intact. The option “-overwrite_original” makes the tool overwrite the file, rather than creating a separate file and renaming the original.

Once you save the file, go to Lightroom and open the export dialog box. On the very bottom of the page, expand “Post-Processing”, then select “Open in Other Application…” from the “After Export” drop-down. Then click on “Choose…” button, browse to “C:\Program Files (x86)\ExifTool\” folder and double click on RemoveJunkEXIF.bat file. The export screen should look like this:

Remove EXIF Data5

Now click “Export” and make sure that you are not getting any errors. If the export succeeded and you did not receive any errors, you are all set! Next time when you export your images, this setting will be preserved and your EXIF Data will be correctly removed from your files!

If you have a bunch of image files that you need to remove EXIF Data from, then I recommend executing exiftool directly from a command prompt. Just copy all your image files to the “C:\Program Files (x86)\ExifTool” directory, then open up command prompt and do the following:

cd "C:\Program Files (x86)\ExifTool"
RemoveJunkEXIF.bat *.jpg

Obviously, if you are on a different platform or placed exiftool in a different folder, just change the folder path above and everything should work perfectly!

P.S. One more thing. If you are wondering why I couldn’t just use Jeffrey Friedl’s “Metadata Wrangler“, then you should know that I actually did use it for a while. But his plugin continuously crashed my Lightroom after 10-15 exports and there was a time limit, which needed a paypal donation to fix. I wouldn’t mind making a contribution to his plugin, but I was getting tired of it crashing and needed a different, permanently working solution.

Please let me know how this worked out for you by leaving a comment below :)


We're Competing for #1
  • Digg
  • del.icio.us
  • Facebook
  • Mixx
  • Google Bookmarks
  • Diigo
  • email
  • LinkedIn
  • Live
  • MySpace
  • Reddit
  • Slashdot
  • StumbleUpon
  • Technorati
  • Twitter
  • Yahoo! Bookmarks

Related posts:

  1. What is EXIF Data?
  2. How to Find Total Shutter Actuations on Nikon and Canon DSLRs
  3. How to Fix Blank Images in Lightroom
  4. How to view DNG thumbnails in Windows
  5. How to Organize Pictures in Lightroom

Nasim Mansurov
is a professional photographer based out of Denver, Colorado. He is the author and founder of The Mansurovs, along with a number of other online resources. Read more about Nasim here.