Skip to main content
August 26, 2010
Question

delete metadata

  • August 26, 2010
  • 4 replies
  • 41320 views

Is there a way yet to save a picture without metadata?

If not, why not?

4 replies

rodrigounda
Known Participant
July 24, 2025

hello!

there used to be a context menu option "strip exif", but I can not find it anymore.
As usual: "Why Adobe, why?!"

 

Legend
July 24, 2025

No Adobe app ever had a menu option to strip EXIF. Maybe you are thinking of something else?

 

There are various ways in File Info, scripts, or EXIFTool to remove most metadata. You'd need to know exactly what has to go or stay.

Stephen Marsh
Community Expert
Community Expert
October 31, 2019

I stumbled over this old post, so just in case somebody else is asking the same... The following script is for Photoshop, not Bridge.

 

https://community.adobe.com/t5/Photoshop/Script-to-remove-all-meta-data-from-the-photo/m-p/10400906

 

/* Remove All Metadata & Retain Layers v2 - a brute force alternative to ExifTool
https://community.adobe.com/t5/photoshop/script-to-remove-all-meta-data-from-the-photo/m-p/10400906
Script to remove all metadata from the photo
30th July 2020 Update */

#target photoshop
app.bringToFront();

/* FLATTENED */
if (app.activeDocument.activeLayer.isBackgroundLayer) {
    // alert('Flattened image...');
    // Call function to duplicate all layers
    DupeSelectedLayers.main = function () {
        DupeSelectedLayers();
    };
    DupeSelectedLayers.main();
    alertMessage();
}

/* SINGLE (TRANSPARENT) LAYER BUG WORKAROUND */
else if (app.activeDocument.layers.length === 1) {
    // alert('Single layer image...');
    // Set the original doc
    var sourceDoc = app.activeDocument;
    // Add a randomly named temp layer
    app.activeDocument.artLayers.add();
    app.activeDocument.activeLayer.name = "2563@361#47&-TEMP_LAYER";
    // Select all layers and layer groups/sets!
    selectAllLayers();
    // Call function to duplicate all layers
    DupeSelectedLayers.main = function () {
        DupeSelectedLayers();
    };
    DupeSelectedLayers.main();
    // Select & remove temporary layer
    removeTempLayer(false);
    // Set the duplicated document
    var dupedDoc = app.activeDocument;
    // Switch back to the original doc
    app.activeDocument = sourceDoc;
    // Select & remove temporary layer
    removeTempLayer(false);
    // Set the duped doc as the active doc
    app.activeDocument = dupedDoc;
    alertMessage();
}

/* MULTIPLE LAYERS */
else {
    // alert('Multiple layer image...');
    // Select all layers and layer groups/sets!
    selectAllLayers();
    // Call function to duplicate all layers
    DupeSelectedLayers.main = function () {
        DupeSelectedLayers();
    };
    DupeSelectedLayers.main();
    alertMessage();
}

///// START FUNCTIONS /////

function selectAllLayers() {
    // https://feedback.photoshop.com/photoshop_family/topics/i-cant-record-sellect-all-layers-in-script-listener-and-in-actions
    var c2t = function (s) {
        return app.charIDToTypeID(s);
    };

    var s2t = function (s) {
        return app.stringIDToTypeID(s);
    };

    var descriptor = new ActionDescriptor();
    var descriptor2 = new ActionDescriptor();
    var reference = new ActionReference();
    var reference2 = new ActionReference();

    reference2.putEnumerated(s2t("layer"), s2t("ordinal"), s2t("targetEnum"));
    descriptor.putReference(c2t("null"), reference2);
    executeAction(s2t("selectAllLayers"), descriptor, DialogModes.NO);
    reference.putProperty(s2t("layer"), s2t("background"));
    descriptor2.putReference(c2t("null"), reference);
    descriptor2.putEnumerated(s2t("selectionModifier"), s2t("selectionModifierType"), s2t("addToSelection"));
    descriptor2.putBoolean(s2t("makeVisible"), false);
    try {
        executeAction(s2t("select"), descriptor2, DialogModes.NO);
    } catch (e) { }
}

// Duplicate all selected layers to new document  
function DupeSelectedLayers() {
    function step1(enabled, withDialog) {
        if (enabled !== undefined && !enabled)
            return;
        cTID = function (s) {
            return app.charIDToTypeID(s);
        };
        sTID = function (s) {
            return app.stringIDToTypeID(s);
        };
        var origFilename = app.activeDocument.name.replace(/\.[^\.]+$/, ''); // Remove filename extension from original
        var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
        var desc1 = new ActionDescriptor();
        var ref1 = new ActionReference();
        ref1.putClass(cTID('Dcmn'));
        desc1.putReference(cTID('null'), ref1);
        // Use the original document filename + suffix
        desc1.putString(cTID('Nm  '), origFilename + "_NoMetadata");
        // Use the original document filename, beware overwriting the original file and losing all metadata!
        // desc1.putString(cTID('Nm  '), origFilename );               
        var ref2 = new ActionReference();
        ref2.putEnumerated(cTID('Lyr '), cTID('Ordn'), cTID('Trgt'));
        desc1.putReference(cTID('Usng'), ref2);
        desc1.putInteger(cTID('Vrsn'), 5);
        executeAction(cTID('Mk  '), desc1, dialogMode);
    }

    step1();
}

function removeTempLayer(makeVisible) {
    // Select & remove temporary layer
    var c2t = function (s) {
        return app.charIDToTypeID(s);
    };
    var s2t = function (s) {
        return app.stringIDToTypeID(s);
    };
    var descriptor = new ActionDescriptor();
    var list = new ActionList();
    var reference = new ActionReference();
    reference.putName(s2t("layer"), "2563@361#47&-TEMP_LAYER");
    descriptor.putReference(c2t("null"), reference);
    descriptor.putBoolean(s2t("makeVisible"), makeVisible);
    list.putInteger(3);
    descriptor.putList(s2t("layerID"), list);
    executeAction(s2t("select"), descriptor, DialogModes.NO);
    app.activeDocument.activeLayer.remove();
}

function alertMessage() {
    alert('File duplicated to remove metadata with "_NoMetadata" suffix added to the filename for safety.' + '\r' + 'Note: guides, color samplers, alpha channels, paths and other common document additions have not been copied.');

}

///// FINISH FUNCTIONS /////

 

 

Paul Riggott
Inspiring
August 26, 2010

It's possible to remove all the metadata in bridge using a script, this should work on most file types except some raw files.

Using ExtendScript Toolkit copy and paste the code into a new window, start Bridge - Edit - Preferences - Startup Scripts, click the "Reveal" button. This will open the folder that the script should be placed. Once that has been done close and restart Bridge and accept the new script.

To use select the documents in Bridge then "Mouse Control/Click menu" select "Remove XMP data"


#target bridge  
if( BridgeTalk.appName == "bridge" ) { 
removeXMPDAT = new MenuElement("command", "Remove XMP data", "at the end of Thumbnail");
}
removeXMPDAT.onSelect = function () {
   removeXMPData();
   }
function removeXMPData(){
if( xmpLib == undefined ) {
  if( Folder.fs == "Windows" ){
   var pathToLib = Folder.startup.fsName + "/AdobeXMPScript.dll";
  } else {
   var pathToLib = Folder.startup.fsName + "/AdobeXMPScript.framework";
  }
  var libfile = new File( pathToLib );
  var xmpLib = new ExternalObject("lib:" + pathToLib );
}
var sels = app.document.selections;
for (var a in sels){
var thumb = app.document.selections;
  var md = thumb.synchronousMetadata; 
  var xmp = new XMPMeta(md.serialize());
        try{
        XMPUtils.removeProperties(xmp, "", "", XMPConst.REMOVE_ALL_PROPERTIES);
        var updatedPacket = xmp.serialize(XMPConst.SERIALIZE_OMIT_PACKET_WRAPPER | XMPConst.SERIALIZE_USE_COMPACT_FORMAT);
        thumb.metadata = new Metadata(updatedPacket);
         }catch(e){alert(e);}
    }
}

August 26, 2010

Wow Paul; you are helpful.  Thanks

and in answer to the other note: I cannot possibly see why when people distribute files, for print for example, they would want to distribute personal data, like camera serial number to strangers.

Omke Oudeman
Participating Frequently
August 26, 2010

I cannot possibly see why when people distribute files, for print for example,

they would want to distribute personal data, like camera serial number to

strangers.

To speak personally I really have no problem with that whatsoever, and also

as a professional photographer I have no problem that my clients can see the

other information also. There is nothing I wish to hide and there will be

very less clients that will look in to that information, they probably don't

even know it is there...

And stripping metadata from files while distributing means also stripping

copyright info and IPTC for description etc. That really sounds as horror to

me!!

But as said, that is personal, and the metadata with e.g. serial number

gives me the opportunity to filter all files taken with that camera in a

very easy way.

I often have stated: so many photographers so many workflows. But makes it

very hard for any vendor to fulfill all the wishes there are for

applications.

Omke Oudeman
Participating Frequently
August 26, 2010

Is there a way yet to save a picture without metadata?

In Safe for Web you can choose to excluded all metadata and there seem to be

scripts that can strip the metadata of files, if you have only a few you can

copy past the file to a new one and that strips also all metadata (open a

file, cmda / Cmdc / cmd n/ cmdv and flatten the new file to one layer.)

If not, why not?

In general metadata are very useful for various reasons and other

applications can benefit from metadata also.

Not many people have the need for such a method hence such a feature will

not be implemented until many user request for it

Participant
February 2, 2024

I'm dismayed that Bridge -- which was created to help manage your photos -- cannot do the simple task of clearing all metadata.

As professionals we are fully aware that metadata can be very useful. But you said @Omke Oudeman, "so many photographers so many workflows".

Not all photos I take are for clients -- there are several use cases for clearing all metadata, since there are many general practical needs for photos that I send to various parties that I don't want to know details about me, my equipment, my location, etc. And I'm not even thinking about generally public cases like social media.

Further, since metadata manipulation is already a part of the product, it can't be a huge ask to simply clear it all. At least for a couple major file types.

Legend
February 2, 2024

You really don't want to clear out ALL metadata, and what you can remove depends on file format and application. EXIFTool can remove the most but even it doesn't touch everything. However, fearmongering isn't helpful either. Its trivial to remove most identifying metadata (or you could just maybe, I dunno, not add it in the first place?)

Use a script, or Save for Web, or manually, or use EXIFTool.