Skip to main content
Participant
July 29, 2020
Answered

PSD file size

  • July 29, 2020
  • 3 replies
  • 693 views

Hi,

I hope I am the only one having this issue with my PSD files. I was having this issue of PSD files size are being too heavy. Even a blank psd file has a 65MB file size. I have transferred to a iMac, Macbook Pro and now Windows and stil have this PSD issues.

Below is a sample PSD that is blank and still has a 65MB file size.
https://we.tl/t-RQA5IRSZ2b

I hope someone had this issue and was able to fix it on all his PSD file cause I have tons of file that has this bug.

Best Regards,
Mikhail

This topic has been closed for replies.
Correct answer rob day

I hope someone had this issue and was able to fix it on all his PSD file cause I have tons of file that has this bug.

 

Here is a variation of the metadata script that will clear the metadata from a folder of .psd files, it reduced your file to 52K:

 

 

 

#target photoshop

var psdFolder = Folder.selectDialog("Select the folder containing PSDs", "");

// to include jpg, tiff, and eps use this:
//var myFiles = psdFolder.getFiles(/\.(jpg|tif|eps|psd)$/i);
var myFiles = psdFolder.getFiles(/\.(psd)$/i); 

for (var a = 0; a < myFiles.length; a++){
    var docRef = open(myFiles[a]);
    cleanMeta(docRef);
};   

function cleanMeta(d){
    if (ExternalObject.AdobeXMPScript == undefined) ExternalObject.AdobeXMPScript = new ExternalObject("lib:AdobeXMPScript");   
    var xmp = new XMPMeta( activeDocument.xmpMetadata.rawData);   
    xmp.deleteProperty(XMPConst.NS_PHOTOSHOP, "DocumentAncestors");   
    d.xmpMetadata.rawData = xmp.serialize(); 
    d.save();
    d.close();
};


 

 

 

3 replies

rob day
Community Expert
rob dayCommunity ExpertCorrect answer
Community Expert
July 29, 2020

I hope someone had this issue and was able to fix it on all his PSD file cause I have tons of file that has this bug.

 

Here is a variation of the metadata script that will clear the metadata from a folder of .psd files, it reduced your file to 52K:

 

 

 

#target photoshop

var psdFolder = Folder.selectDialog("Select the folder containing PSDs", "");

// to include jpg, tiff, and eps use this:
//var myFiles = psdFolder.getFiles(/\.(jpg|tif|eps|psd)$/i);
var myFiles = psdFolder.getFiles(/\.(psd)$/i); 

for (var a = 0; a < myFiles.length; a++){
    var docRef = open(myFiles[a]);
    cleanMeta(docRef);
};   

function cleanMeta(d){
    if (ExternalObject.AdobeXMPScript == undefined) ExternalObject.AdobeXMPScript = new ExternalObject("lib:AdobeXMPScript");   
    var xmp = new XMPMeta( activeDocument.xmpMetadata.rawData);   
    xmp.deleteProperty(XMPConst.NS_PHOTOSHOP, "DocumentAncestors");   
    d.xmpMetadata.rawData = xmp.serialize(); 
    d.save();
    d.close();
};


 

 

 

mik-aymAuthor
Participant
July 29, 2020

Thanks Rob.

I not so familiar with this script. May I know how can I run it? Is it a .bat file? or A script file that I need to Edit>Script>Browse?

c.pfaffenbichler
Community Expert
Community Expert
July 29, 2020

Save the code as a txt-file, change the extension to .jsx and copy it into Photoshop’s Presets/Scripts-Folder; after restarting Photoshop it should be available under File > Scripts and can be assigned a Shortcut or used in an Action. 

Legend
July 29, 2020

1. For an image file "blank" is not "empty". An image is made of pixels, ever one of them exists even if every one of them is white.

2. Your image file is not blank either. It has a very specific design in it already. It has blank areas, ready for more work.

3. Nevertheless, the file is only 828 x 371 pixels in 8 bit RGB, and Photoshop considers what you already have is 900K. So your file, while it is not blank is unexpectedly large.

4. There is a problem where if you keep editing, clearing, pasting the same info the file gets bigger and bigger, because it keeps info about every edit ever made. It is called "ancestor metadata bloat" and this seems to have happened here. Start again with a completly blank file; do not import or paste anything into it. Check the size.

c.pfaffenbichler
Community Expert
Community Expert
July 29, 2020

»Start again with a completly blank file«

One should also be able to use a Script to remove the metadata. 

mik-aymAuthor
Participant
July 29, 2020

Yes, It should be added as feature in Photoshop, Because I think a lot of people is having this size problem.

c.pfaffenbichler
Community Expert
Community Expert
July 29, 2020