metadatawrangler-20080828.15.zip
· Version History
· Installation instructions
· More Lightroom Goodies
· My Photo-Tech Posts
· My Blog
My “Metadata Wrangler” plugin filter for Lightroom 2 or later allows you to strip selected metadata components from images as they are exported. You can use it, for example, to remove the embedded thumbnail and any Lightroom “develop” metadata, while retaining other metadata, such as the exposure settings, lens information, copyright, etc.
Links for download and install instructions are at right; continue reading below for a description of the plugin's features.
(Note: Please see the known issues before reporting bugs.)
Overview
Here's a screenshot showing the options and features of the Metadata Wrangler as it appears in the Export Dialog, as of its initial public release:

What metadata you choose to strip – and to leave intact – can vary greatly depending on your intended use. For example, it makes sense to strip at least the embedded thumbnail from small exports that are themselves intended to be used as thumbnails. In such a case, it may well make sense to strip everything but copyright information, to keep the file size small.
On the other hand, it may well make sense to preserve most metadata on images intended for upload to a photo-sharing site, yet remove the embedded thumbnail that does little but increase the file size (and hence the file-upload time).
In any case, only the exported copy of the image is affected; both the original image and the Lightroom library are never changed by this plugin.
It's a “Filter”
I call the Metadata Wrangler an “export filter”, but in the official Lightroom vernacular, it's a “post-process action”. The point is that unlike a full export plugin (such as my “Export to Flickr” plugin), this filter (post-process action) can be used with any export from Lightroom. It can be used in conjunction with the standard “Files on Disk” export, in conjunction with one of my other plugins (e.g. “Export to Zenfolio”, “Export to PicasaWeb”), or any other third-party export plugin.
Metadata Can Be a Bit Tricky
I don't know that there's a good reason for it, but it's turned out that image-file metadata formats have grown into somewhat of a mess. Luckily, Phil Harvey has created the most excellent exiftool library that makes this plugin's work much easier. It's the same metadata-handling library used for the back end of my online Exif viewer. If you find this Metadata Wrangler plugin useful, please consider making a donation to the Exiftool Project in thanks.
Nevertheless, some of the “metadata mess” remains exposed to you, the user, as evidenced by the mishmash of XMP blocks. Here's part of the Metadata Wrangler in Lightroom's export dialog dealing with XMP blocks....

You can have all XMP data preserved or stripped by clicking on the “preserve” or “remove” next to the “XMP Blocks” label at the top, but if you want to be selective, you may have to do some research to see in which block or blocks the data you're interested in lies. It's a bit cryptic for the non-engineer, but the XMP-block info at the exiftool site lists exactly what fields are in each block. (The “XMP Info” button in the dialog links to that page as well.)
Two of the XMP blocks are fairly straightforward. The XMP “crs” block contains all the information about Lightroom develop adjustments (crop, exposure, localized corrections, etc.). You'll want to strip this block if you want to hide – or just don't feel the need to include with the image – all the develop changes you've made to an image.
The XMP “exif” block contains a repeat of most of the Exif data represented individually lower in the dialog. I'm not sure that there's 100% coverage, but I generally strip it unless I intend the exported image to be for some kind of archive.
Presets
The Metadata Wrangler supports its own preset mechanism. The dropdown near the top of the Metadata Wrangler export-dialog section allows you to create and recall presets of exclude/preserve decisions:

“Preserve Metadata” and “Remove Metadata” are standard presets that adjust the settings to save/remove all metadata. You can create a new preset by making some change to the dialog settings, then choose “save current settings as a preset”.
The current settings for the Metadata Wrangler are also part of any Lightroom Export Preset that you create while the Metadata Wrangler is installed and enabled. Note that the individual settings are saved to the Lightroom export preset, rather than any Metadata Wrangler preset name that might be in effect. This means that if you create a Lightroom Export Preset and then later change the meaning of a Metadata Wrangler preset, that change is not reflected back into the Lightroom Export Preset. (This paragraph is a bit confusing, sorry.)
Metadata Not Explicitly Listed...
The bottom of the dialog section includes a catch-all item that governs how the whole plugin approaches its work:

When “Remove” is selected here, all metadata is removed, and then only items explicitly listed as “Preserve” elsewhere in the dialog are added back. Conversely, when “Preserve” is selected, the items explicitly listed as “Remove” are manually removed from the exported image.
I believe that the end result is always the same – that all metadata that could be in the image is listed earlier in the dialog – but I've included this option as a “just in case”. When I'm exporting small images for use as thumbnails on my site, for example, I strip everything except what I explicitly want to keep: the ICC Color profile, and the copyright/artist information.
| 20080828.15 | Minor tweaks |
| 20080828.14 | A few more tweaks to report a failed upgrade attempt a bit more clearly |
| 20080828.13 | When upgrading, ignore a status of “50” (which means “out of disk space”) from the unzip the plugin performs. It seems Windows often reports this status even when there's plenty of disk space left, so until I can understand it better, I'll just ignore that code. |
| 20080817.12 | Lots of little tweaks as I cleaned things up. Added a bunch of stuff to the Plugin Manager, including a “What's New” button that shows up next to the “Upgrade Now” button when a new version is available. |
| 20080814.11 | Fixed infinite cycle of 'assert' messages one might get in odd situations |
| 20080811.10 | Moved and renamed the debugging logs to a temporary folder, and added log Show/Delete buttons to the plugin's custom section of the Plugin Manager. |
| 20080808.9 | Fixed the "LrShell" problem while using the one-click plugin upgrade. |
| 20080807.8 | Fixed the "strict.pm" error that Windows users were seeing. |
| 20080807.7 | Updated the plugin links to refer to the proper page, rather than my blog. |
| 20080806.6 | An attempt to fix the "Access to undefined global: quote" bug.... we'll see. |
| 20080731.5 | Fruits of the debugging... should now work for more people |
| 20080730.4 | More debugging stuff... |
| 20080730.3 | Added more debugging to the log file ("lr-plugin.log" in the Documents/MyDocuments folder) to help debug when things don't work. |
| 20080729.2 | Cosmetic change: swapped the section-heading "preserve" / "remove" buttons to match the order of the columns. |
| 20080729.1 | Initial public release |
See the known issues before reporting bugs. Also, when reporting bugs, please include the OS, the version number of Lightroom, and the version number of the plugin.
Jeffrey, this looks very useful - but I do have one suggestion. The ordering of “remove and preserve” in the section headings is opposite of what it is for the detailed line items, and this seems a bit confusing in use.
Hah, didn’t even think of that. Fixed in *.2. Thanks! —Jeffrey
Hi, and again first big thanks on excellent contribution to Lightroom usability by updating the plugins.
However, it appears that with Windows there is a problem when running Metadata Wrangler plugin: is throws me a requester stating “Metadata Wrangler: error running metadata-removal command”. The folders Win and lib provbided with plugin are both empty. Should there be something, or should I download and install exiftool myself? I actually already tried it, but with no success. The exiftool.exe was loceted both in lib and Win directories.
Hello, I seem to have the same problem as XPa but under MacOS X 10.4.11…
Thanks again for these most excellent plugins, it greatly help LR2 usage. You also take very nice pictures and thanks to RSS feeds, I follow it almost everyday.
Ollivier and KPa, I’ve pushed a new version (.3) that puts a lot more into the debugging log. If it fails again, could you send the log via email? Thanks. —Jeffrey
Hello, nd a big thanks for the great lightroom-plugins.
But with the metadata wrangler plugin I get an error when activating. It says that it’s installed but it may not work.
Here I give the log-output also:
Plug-in error log for plug-in at: C:\Program Files\Adobe\Adobe Photoshop Lightroom 2\metadatawrangler-jfriedl.lrplugin
**** Error 1
An error occurred while attempting to run one of the plug-in’s scripts.
Access to undefined global: quote
**** Error 2
An error occurred while attempting to run one of the plug-in’s scripts.
Access to undefined global: quote
**** Error 3
Could not open dialog for plug-in.
Access to undefined global: async_version_check
Best regards,
Mark Wijnants
I think this is finally fixed in .6 —Jeffrey
Looks superb, Jeffrey, bravo. A question though - does the post processing step mean that Windows users will have to be careful with the length of their file paths when they run large exports?
I don’t think that really matters. Each image is handled in turn, the lengths don’t accumulate. —Jeffrey
Not to beat a dead horse, but I’m getting the exact same issue as the last 2 folks - I’m running LR2 on XP.
Thanks so much for the good stuff -
Finally fixed, I think, in .6 —Jeffrey
I also have the same problem to report using the latest Lightroon 2 commercial and 20080731.5
If I can give any info to help then please let me know.
John.
Hi Jeffrey,
I am getting the same diagnostic messages as above. LR2, latest Wrangler (v20080731.5), Vista 64 bit.
I am a software developer by trade. Anything I can do to help? Maybe run some lua debug code on my system and report the output?
Thanks for your fantastic plugins,
Jeffrey Hunter
Hi Jeffrey,
The new version fixed the “Access to undefined global” errors for me.
Thanks,
Jeff Hunter
Excellent, thanks for the report. —Jeffrey
Hi Jeffrey
Plugin is just what I’m looking for……however when I export (with EXIF deselected) I get an error written:-
Execute log:
————————————————–
> Can’t locate strict.pm in …..
————————————————–
And the resulting TIFF contains EXIF data.
Details:-
WinXP
LR 2.0
Thanks in advance!
Simon Brown
I think I’ve fixed this in .8. I’ve been flying blind on the Windows changes since leaving Kyoto, but I just installed LR on my Dad’s Windows box so that I could actually test it, and it seems to work now…. —Jeffrey
Hi,
Jeffrey, please do not let this to interfere your vacation with the family. I believe that we can wait until you have enjoyed your time with the family.
That said, I’, sorry to report same problem that Jim and Simon already did (on XP SP3).
It seems that it’s not simple issue of usinf strict.pm that is not located, and when perl code is run “non strict”, bunch of other (Lua?) errors appear. Logs will be in you email.
Regards,
/KPa
20080807.8 works for me - thank you.
Hi,
Also I tested .8, and based on the few test exports with various combinations of metadata it now appears to work ok. Big thanks.
Regards,
/KPa
This looks very handy. I wonder (since the Run any command Piglet is beyond my grasp currently) if it is possible to update the metadata on export using a future version of wrangler not just preserve or remove. For example if you wanted to add IPTC Right Usage terms for a particular stock image sale but NOT change the metadata in LR catalog?