Highlighted

Metadata Bloat - Abnormally large PSD files when I save them

New Here ,
Jul 16, 2020

Copy link to clipboard

Copied

Hi, I updated to the latest version of PS last week, and ever since my PSD files have been huge when saved. Files that have been around 7-10 mb are now a 100. It's really annoying, and for some reason the scripts event manager is not helping me so I have to manually do this with every file before saving.

https://helpx.adobe.com/photoshop/kb/file-info-freezes-cannot-display-raw-metadata.html

 

This never happened to me before, but it's definitely not fixed..

 

I'm working on Mac OS 10.15.5 with the 21.2.0 release of Photoshop 

 

 

 

Most Valuable Participant
Correct answer by JJMack | Most Valuable Participant

See if this script helps.

function deleteDocumentAncestorsMetadata() {  
    whatApp = String(app.name);//String version of the app name  
    if(whatApp.search("Photoshop") > 0)  { //Check for photoshop specifically, or this will cause errors  
        //Function Scrubs Document Ancestors from Files  
        if(!documents.length) {  
        alert("There are no open documents. Please open a file to run this script.")  
        return;   
        }  
        if (ExternalObject.AdobeXMPScript == undefined) ExternalObject.AdobeXMPScript = new ExternalObject("lib:AdobeXMPScript");   
        var xmp = new XMPMeta( activeDocument.xmpMetadata.rawData);   
        // Begone foul Document Ancestors!  
            xmp.deleteProperty(XMPConst.NS_PHOTOSHOP, "DocumentAncestors");  
            app.activeDocument.xmpMetadata.rawData = xmp.serialize();  
         }  
}  
//Now run the function to remove the document ancestors  
deleteDocumentAncestorsMetadata(); 

Topics

Bug, Import and export, Mac, Performance, Problem or error

Views

40

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

Metadata Bloat - Abnormally large PSD files when I save them

New Here ,
Jul 16, 2020

Copy link to clipboard

Copied

Hi, I updated to the latest version of PS last week, and ever since my PSD files have been huge when saved. Files that have been around 7-10 mb are now a 100. It's really annoying, and for some reason the scripts event manager is not helping me so I have to manually do this with every file before saving.

https://helpx.adobe.com/photoshop/kb/file-info-freezes-cannot-display-raw-metadata.html

 

This never happened to me before, but it's definitely not fixed..

 

I'm working on Mac OS 10.15.5 with the 21.2.0 release of Photoshop 

 

 

 

Most Valuable Participant
Correct answer by JJMack | Most Valuable Participant

See if this script helps.

function deleteDocumentAncestorsMetadata() {  
    whatApp = String(app.name);//String version of the app name  
    if(whatApp.search("Photoshop") > 0)  { //Check for photoshop specifically, or this will cause errors  
        //Function Scrubs Document Ancestors from Files  
        if(!documents.length) {  
        alert("There are no open documents. Please open a file to run this script.")  
        return;   
        }  
        if (ExternalObject.AdobeXMPScript == undefined) ExternalObject.AdobeXMPScript = new ExternalObject("lib:AdobeXMPScript");   
        var xmp = new XMPMeta( activeDocument.xmpMetadata.rawData);   
        // Begone foul Document Ancestors!  
            xmp.deleteProperty(XMPConst.NS_PHOTOSHOP, "DocumentAncestors");  
            app.activeDocument.xmpMetadata.rawData = xmp.serialize();  
         }  
}  
//Now run the function to remove the document ancestors  
deleteDocumentAncestorsMetadata(); 

Topics

Bug, Import and export, Mac, Performance, Problem or error

Views

41

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Most Valuable Participant ,
Jul 16, 2020

Copy link to clipboard

Copied

See if this script helps.

function deleteDocumentAncestorsMetadata() {  
    whatApp = String(app.name);//String version of the app name  
    if(whatApp.search("Photoshop") > 0)  { //Check for photoshop specifically, or this will cause errors  
        //Function Scrubs Document Ancestors from Files  
        if(!documents.length) {  
        alert("There are no open documents. Please open a file to run this script.")  
        return;   
        }  
        if (ExternalObject.AdobeXMPScript == undefined) ExternalObject.AdobeXMPScript = new ExternalObject("lib:AdobeXMPScript");   
        var xmp = new XMPMeta( activeDocument.xmpMetadata.rawData);   
        // Begone foul Document Ancestors!  
            xmp.deleteProperty(XMPConst.NS_PHOTOSHOP, "DocumentAncestors");  
            app.activeDocument.xmpMetadata.rawData = xmp.serialize();  
         }  
}  
//Now run the function to remove the document ancestors  
deleteDocumentAncestorsMetadata(); 
JJMack

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
New Here ,
Jul 16, 2020

Copy link to clipboard

Copied

Thanks, I managed to integrate this one with the event manager.

 

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Adobe Community Professional ,
Jul 16, 2020

Copy link to clipboard

Copied

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...