• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Metadata Bloat - Abnormally large PSD files when I save them

New Here ,
Jul 16, 2020 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.

File Info dialog is slow to open, freezes, or cannot display raw metadata

 

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 

 

TOPICS
Actions and scripting , macOS

Views

2.9K

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
community guidelines

correct answers 1 Correct answer

Community Expert , Jul 16, 2020 Jul 16, 2020

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 ==
...

Votes

Translate

Translate
Adobe
Community Expert ,
Jul 16, 2020 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

Votes

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
community guidelines
New Here ,
Jul 16, 2020 Jul 16, 2020

Copy link to clipboard

Copied

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

 

Votes

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
community guidelines
New Here ,
Apr 30, 2021 Apr 30, 2021

Copy link to clipboard

Copied

Hi, how to use this script. I am facing simiar issue

Votes

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
community guidelines
Community Expert ,
Apr 30, 2021 Apr 30, 2021

Copy link to clipboard

Copied

Votes

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
community guidelines
Explorer ,
Aug 06, 2022 Aug 06, 2022

Copy link to clipboard

Copied

If anyone was confused by this like I was, this explains how to do it:
https://www.youtube.com/watch?v=epgGg-reKWg

Votes

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
community guidelines
Community Expert ,
Jul 16, 2020 Jul 16, 2020

Copy link to clipboard

Copied

Votes

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
community guidelines
Participant ,
Jan 31, 2023 Jan 31, 2023

Copy link to clipboard

Copied

I also just wanted to chime in to stay that I had this exact same issue. In my case it was happening with some transparent png files. I was exporting low-res pdfs from InDesign with the placed pngs and my files were huge! I was able to fix it by just copy and pasting into a new file in photoshop. Resaved the new file (as png or as psd, both worked) and updated the InDesign links and all is good again. My low-res exported pdf page went from like 9MB to 126kb!

Votes

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
community guidelines
Community Expert ,
Jan 31, 2023 Jan 31, 2023

Copy link to clipboard

Copied

@katielady1 – That is great for you!

 

My experience is that for most people:

 

1) Copy/paste to a new file usually copies metadata over to the new file, so nothing is gained

 

2) Once the bloated metadata is in the InDesign file the layout file also becomes bloated and one has to perform a save as to force the updated clean files reduced metadata to be cleaned from the layout.

 

Votes

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
community guidelines
Community Beginner ,
Oct 02, 2023 Oct 02, 2023

Copy link to clipboard

Copied

I'm just recently having the same issue, but unfortunatley Copy&Paste doesn't bypass the issue; even if I copy a 10x10pixel square from the bloated file (itself just a white canvas!), the new file won't save at anything less that 60MB

Running a script on existing files seems like an overly laborious 'fix', rather than an ongoing solution

Votes

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
community guidelines
Community Expert ,
Oct 02, 2023 Oct 02, 2023

Copy link to clipboard

Copied

quote

I'm just recently having the same issue, but unfortunatley Copy&Paste doesn't bypass the issue;


That is correct.

 

Duplicating all layers to a new file does bypass the metadata. This may be necessary if you wish to retain bit depth, colour mode or layers in the source file, understanding that most metadata will be lost, wanted or unwanted.

 

Otherwise a script or ExifTool command is more surgical on a master file.

 

Derivative exports to web can still use Export As or Save for Web.

 

quote

Running a script on existing files seems like an overly laborious 'fix', rather than an ongoing solution


By @chris7ian


This can be automated on the file open event or save event, so hardly laborious. The setup is only required once.

 

More here:

 

https://prepression.blogspot.com/2017/06/metadata-bloat-photoshopdocumentancestors.html

Votes

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
community guidelines
Community Expert ,
Oct 02, 2023 Oct 02, 2023

Copy link to clipboard

Copied

If it's DocumentAncestors metadata, it travels with a copy/paste. That's actually the whole purpose of it, since it's intended to be a complete record of file history with all copy/paste/place operations.

 

This is a common problem with templates that are reused ad infinitum.

 

Export and Save For Web will strip it, however. And Stephen's scripts, of course.

 

EDIT cross post

Votes

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
community guidelines
Community Beginner ,
Oct 02, 2023 Oct 02, 2023

Copy link to clipboard

Copied

I'm unfamilair with scripts, as you can probably tell! So I can add this script and leave it forever more?
The YouTube clip suggests deleting the script once the errant file is fixed, butI want to avoid the problem arising again in future...
Is it your script? The name is similar - if so, thanks! Can I add it to only apply to saving jpegs or is it a case of once enabled it will apply to all files?

Votes

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
community guidelines
Community Expert ,
Oct 02, 2023 Oct 02, 2023

Copy link to clipboard

Copied

LATEST

@chris7ian 


Photoshop has many scripts installed by default, many use them without even realising that they are using a script.

 

Custom scripts are of course different and may appear confusing at first.

 

I didn't write the scripts, I have just compiled and curated them.

 

I am not familiar with the video you mentioned.

 

 I previously posted the link to my blog, where I mention the use of such metadata scripts with a feature called the "Script Events Manager".

 

https://prepression.blogspot.com/2021/10/photoshop-script-events-manager.html

 

https://prepression.blogspot.com/2017/01/photoshop-custom-action-file-backup.html

 

Votes

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
community guidelines