Copy link to clipboard
Copied
By mistake, I had my preferences set to record a history log in metadata. I want to share the photo but without the recipient being able to see the changes I've made. Is there a way to delete or clear the history log? Or to send the photo without that information? (It needs to be a good version of the image, so something like a screenshot won't work.) (I'm using PS CS6 in windows). Any help would be appreciated.
If you don't have any other requirements for retaining metadata, you can use Export As or Export Save for Web (Legacy) which both strip metadata or offer options for retaining limited metadata for JPEG and PNG.
Another option is to select all layers, then use the Layer menu > Duplicate command to dupe the layers to a new file, which will not include document metadata, which is more useful if you need to share say a layered PSD.
Other options would be a custom script for Photoshop, Bridge or
...Copy link to clipboard
Copied
If you don't have any other requirements for retaining metadata, you can use Export As or Export Save for Web (Legacy) which both strip metadata or offer options for retaining limited metadata for JPEG and PNG.
Another option is to select all layers, then use the Layer menu > Duplicate command to dupe the layers to a new file, which will not include document metadata, which is more useful if you need to share say a layered PSD.
Other options would be a custom script for Photoshop, Bridge or using 3rd party software such as ExifTool.
A generic XMP metadata removal option is part of the following script (not specifically history):
Copy link to clipboard
Copied
Thanks very much for all the suggestions. Using the layers menu trick worked and deleted all the metadata. I've also downloaded the exiftool and tried that and it looks like that will delete the history log and leave some camera info so that should be helpful. I tried to use Export As but for some reason the only options that show there are Paths to Illustrator and Zoomify -- I'm not sure what those are but when I tested them they unfortunately didn't seem to be usable. Thanks again for the help.
Copy link to clipboard
Copied
I've also downloaded the exiftool and tried that and it looks like that will delete the history log and leave some camera info so that should be helpful.
By @laris99
The three scripts that I posted will do similar to ExifTool, only removing the History Log metadata.
For the sake of completeness, the ExifTool command would be similar to:
exiftool -XMP-photoshop:History= "C:\Path to\File.jpg"
Copy link to clipboard
Copied
I tried to use Export As but for some reason the only options that show there are Paths to Illustrator and Zoomify -- I'm not sure what those are but when I tested them they unfortunately didn't seem to be usable. Thanks again for the help.
By @laris99
What version of Photoshop are you using?
You should see something like this:
Copy link to clipboard
Copied
I only have PS CS6. This is what I see.
Copy link to clipboard
Copied
Ah, but you still have Save for Web if needed in CS6.
Copy link to clipboard
Copied
Ah, but you still have Save for Web if needed in CS6.
By @Stephen Marsh
yes I do, and that works too. Should have mentioned that before, sorry! Thanks again for the help.
Copy link to clipboard
Copied
Save for Web wasn't "legacy" yet in CS6! 😊 I don't remember when it became legacy, though. @Stephen Marsh do you remember?
Jane
Copy link to clipboard
Copied
@jane-e - I can't recall when (Legacy) was added, some time after Export As was introduced.
Copy link to clipboard
Copied
Here is an example of a Script that would remove Photoshop History Log metadata from an open document:
// Remove Photoshop History Log Metadata from Open Doc.jsx
#target photoshop
removeHistoryLogMeta();
function removeHistoryLogMeta() {
if (!documents.length) return;
if (ExternalObject.AdobeXMPScript == undefined) ExternalObject.AdobeXMPScript = new ExternalObject("lib:AdobeXMPScript");
var xmp = new XMPMeta(activeDocument.xmpMetadata.rawData);
XMPUtils.removeProperties(xmp,XMPConst.NS_PHOTOSHOP, "History", XMPConst.REMOVE_ALL_PROPERTIES);
app.activeDocument.xmpMetadata.rawData = xmp.serialize();
}
Depending on workflow requirements, a script that processed a folder of files, or a version for Adobe Bridge script may be preferred.
EDIT: Here is one for a folder of supported file formats, you can add/remove file extensions as required from the code:
// Remove Photoshop History Log Metadata from Folder of Files.jsx
#target photoshop;
var inputFolder= Folder.selectDialog ("Please select folder to process");
if(inputFolder != null){
var fileList = inputFolder.getFiles(/\.(jpg|jpeg|tif|tiff|psd|png)$/i);
for(var a in fileList){removeHistoryLogMeta(fileList[a]);}
}
function removeHistoryLogMeta(selectedFile) {
if (ExternalObject.AdobeXMPScript == undefined) ExternalObject.AdobeXMPScript = new ExternalObject("lib:AdobeXMPScript");
var xmpFile = new XMPFile( selectedFile.fsName, XMPConst.FILE_UNKNOWN, XMPConst.OPEN_FOR_UPDATE | XMPConst.OPEN_USE_SMART_HANDLER );
var xmp = xmpFile.getXMP();
xmp.deleteProperty(XMPConst.NS_PHOTOSHOP, "History");
if (xmpFile.canPutXMP(xmp)) {
xmpFile.putXMP(xmp);
xmpFile.closeFile(XMPConst.CLOSE_UPDATE_SAFELY);
}
};
EDIT 2:
Here is one for selected files in Adobe Bridge (look in the Tools menu once installed):
/*
Remove Photoshop History Log Metadata from Adobe Bridge.jsx
Based on:
https://community.adobe.com/t5/photoshop-ecosystem-discussions/hide-camera-raw-settings-in-jpeg-metadata/m-p/10306319
*/
#target bridge
if (BridgeTalk.appName == "bridge") {
removeHistoryLogMeta = new MenuElement("command", "Remove Photoshop History Log Metadata", "at the end of Tools");
}
removeHistoryLogMeta.onSelect = function () {
if (ExternalObject.AdobeXMPScript == undefined) ExternalObject.AdobeXMPScript = new ExternalObject("lib:AdobeXMPScript");
var sels = app.document.selections;
for (var a in sels) {
var thumb = new Thumbnail(app.document.selections[a]);
var md = thumb.synchronousMetadata;
var xmp = new XMPMeta(md.serialize());
if (thumb.hasMetadata) {
XMPUtils.removeProperties(xmp, XMPConst.NS_PHOTOSHOP, "History", XMPConst.REMOVE_ALL_PROPERTIES);
var updatedPacket = xmp.serialize(XMPConst.SERIALIZE_OMIT_PACKET_WRAPPER | XMPConst.SERIALIZE_USE_COMPACT_FORMAT);
thumb.metadata = new Metadata(updatedPacket);
}
}
};
https://prepression.blogspot.com/2017/11/downloading-and-installing-adobe-scripts.html
Copy link to clipboard
Copied
Thanks very much for this. Unfortunately I couldn't figure out how to install a script (still pretty much a newbie) but I'll keep this info if I figure it out!
Copy link to clipboard
Copied
Thanks very much for this. Unfortunately I couldn't figure out how to install a script (still pretty much a newbie) but I'll keep this info if I figure it out!
By @laris99
I provided a link to my blog with full instructions. Please do try again when you have time.
https://prepression.blogspot.com/2017/11/downloading-and-installing-adobe-scripts.html
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Hi! I tried to follow all of the steps from your blog for Bridge, but there is no script anywhere in Bridge. I don't know much and I 'm just trying to be able to remove all edit history from my files. Thanks for any help!
Copy link to clipboard
Copied
@Luxseniors wrote:
Hi! I tried to follow all of the steps from your blog for Bridge, but there is no script anywhere in Bridge. I don't know much and I 'm just trying to be able to remove all edit history from my files. Thanks for any help!
In this example, the script named "Clear History from Metadata.jsx" was saved as a plain-text file (not rich-text) in the Startup Scripts folder:
After restarting Bridge, you should receive a message that a new script has been installed and do you wish to enable the script. I'm not seeing this in Bridge 2024, however, going into preferences I can see that the script is installed and active:
Then select the images and go to the Tools menu:
Copy link to clipboard
Copied
HI Stephen,
I'm not familiar on writing scripts. I am interested in obtaining the script you wrote for Remove Photoshop History Log Metadata from Adobe Bridge.jsx. Could you please email the completed .jsx file for MAC OS?
Thanks,
Jim Di Loreto
Smithsonian Photographer
Washington, DC USA
Copy link to clipboard
Copied
Just copy and paste the code into a plain text file using the instructions provided in this topic at my blogpost for saving and installing scripts in Adobe apps. It's all in this topic discussion.
Copy link to clipboard
Copied
Stephen,
Still does not work for me. Gov't issued computers limit what we can do. If you can email the file, Remove Photoshop History Log Metadata from Adobe Bridge.jsx. that will be the best option for me.
[email link removed as per forum guidelines]
Copy link to clipboard
Copied
Stephen,
Still does not work for me. Gov't issued computers limit what we can do.
By @Jimmy_D_Photo
Surely you can:
?
Copy link to clipboard
Copied
@Stephen Marsh attached are the steps I did using Apple Text Edit app. There is no option to save as a .txt, so I saved as .rtf and renamed to .jsx.
Copy link to clipboard
Copied
@Stephen MarshMicrosoft Word allows to save .txt. Did that and same steps to remaune and install in scrips folder. Still does not work.
Copy link to clipboard
Copied
Use TextEdit and either convert to plain text for one time use or change your Preferences / Settings, as I do.
Details here from Apple Support:
You can change the format of your document. Plain text (.txt) doesn’t allow formatting. Rich text (.rtf) allows formatting, tables, and images. When you change a rich text document to plain text, the document loses all text styles and formatting options.
In the TextEdit app on your Mac, choose Format > Make Plain Text or Format > Make Rich Text.
https://support.apple.com/guide/textedit/open-documents-txte51413d09/1.19/mac/14.0
Jane
Copy link to clipboard
Copied
@jane-eI got it to work. thanks.
Copy link to clipboard
Copied
Find more inspiration, events, and resources on the new Adobe Community
Explore Now