Or you can just remove the preview image, which in this case is where the savings comes from – rendering a white preview compresses better than a full image.
Settings > File Handling > Image Preview > Ask when saving
"One weird trick to reduce your PSD file size"
But seriously, if you just add the white layer to the Teehan+Lax iOS 8 PSD, it drops from 110MB to 79MB.
If you add the white layer and rasterize the placeholder photography in the Google's Material Design Stickersheet, it drops from 250MB to 35MB (!).
This is Pied Piper for Designers.
Bonus: Add a layer of the flattened image instead of a blank white layer to maintain previews. (I usually label it "Flat Preview" to avoid confusion).
So this is a pretty silly thing to do. If you're going down this route, then you might as well disable compatibility mode.
When compatibility mode is enabled, the PSD file format stores the full sized preview image at the end of the file, which is used by apps to show a preview of the PSD (even if Photoshop isn't installed). This preview image is encoded with RLE (run-length encoding), which optimizes the amount of data based on repeating color channel values. So, if you have 10 pixels in a row that have the exact same amount of red in them, it can compress them in a such a way that says, "hey, the next 10 pixels are red value 230" instead of storing "230 230 230 230..." and so on. By applying a solid white layer on top of everything, you are using the optimal condition for encoding the image with RLE. Basically, each row of the image becomes 1 instruction that contains the color channel value and the width of the image.
Also, when compatibility mode is enabled, every single layer also has image data that is stored in the PSD file (albeit without layer styles applied). Depending on the size of the layer, this will be also stored as RLE or as the raw color channel values with no compression. In rare cases it can be ZIP compressed too.
So, bottom line... if you want to create the smallest PSDs possible and you don't care about the preview in OSX or wherever, just enable compatibility mode. Using the white layer only gets rid of the full preview image, and not the individual layer images. Compatibility mode removes both.
Apparently it can be a solid color, not only white.
Silly and useful. Thanks!
useful, something those that knew about it will dismiss as obvious.
something Sketch users won't hesitate in telling everyone they don't have that problem.
You'd think that Adobe would fix how they do previews.
I don't really think there is anything to fix. You can disable previews if you want.
Cool, I didn't know this before.