Sub topic 11
Duplicating smart objects: shared versus independent copies
Photoshop has two ways to copy a smart object. One keeps the copies linked to the same contents, so editing one changes all of them. The other gives the copy its own contents. This chapter explains how each behaves, how to tell them apart, and how to choose.
This chapter assumes you can create smart objects and edit their contents, and that you are comfortable with layer masks and the Layers panel. Embedded versus linked smart objects, covered earlier, matters here too.
Two kinds of copy
A smart object layer is a pointer to stored source data plus layer-level settings. The layer-level settings are the transform, the mask, the blend mode, and any smart filters. The two copy commands differ in whether the source data is duplicated.
| Command | Where to find it | Source data | Edit Contents on one copy |
|---|---|---|---|
| Duplicate Layer (or Ctrl/Cmd+J) | Layer > Duplicate Layer, or drag the layer onto the New Layer button | Shared with the original | Updates every shared copy |
| New Smart Object via Copy | Layer > Smart Objects > New Smart Object via Copy | Separate copy of the data | Updates only that layer |
Duplicate Layer is the default behavior in most workflows. If you press Ctrl/Cmd+J on a smart object, you get a shared copy.
What is shared and what is not
Only the source contents are shared. Everything applied to the layer stays per layer.
- Shared: the pixels or vector data inside the smart object. If you open one instance with Edit Contents, change the artwork, and save, all shared instances update.
- Per layer: position, scale, rotation, and warp. Layer masks, blend mode, opacity, and layer styles are per layer too.
- Per layer: smart filters. Each layer has its own filter list, settings, and smart filter mask. Changing a filter on one copy does not change the filter on another.
This split is what makes shared copies useful. You can reuse one logo or texture in many places. Each place can have its own size, angle, and filter treatment, and one edit to the source updates all of them.
Worked example: a repeated badge
Suppose a poster has a round badge repeated four times at different sizes.
- Convert the badge artwork to a smart object.
- Select the layer and press Ctrl/Cmd+J three times. You now have four layers that share one source.
- Scale and move each layer with Free Transform. Each layer keeps its own transform.
- Double-click one layer's thumbnail to open its contents. Change the badge color and save with Ctrl/Cmd+S.
- Return to the poster. All four badges show the new color, and each keeps its own size and position.
Now suppose the client wants one badge in gold and the other three unchanged. Select the badge that should differ and choose Layer > Smart Objects > New Smart Object via Copy. That layer now has its own contents. Edit it, and the other three stay as they were.
How to tell which kind you have
Photoshop gives no obvious label on the layer. Both kinds show the smart object badge in the thumbnail, and both usually get a "copy" suffix in the name. Use one of these checks:
- Open the contents of one layer with Edit Contents, make a visible change, and save. Check whether the other layer changed.
- Open the contents of both layers. Shared instances usually open the same embedded source, so the temporary tab shows the same content.
- Keep a naming convention. Rename shared instances with a common prefix such as
badge-shared-01, and independent ones with a different prefix.
A test edit works best. Use Undo or a history state to revert it if you were only checking.
Scripting the two copy types
You can run both operations from ExtendScript. The first call uses the document object model and behaves like Duplicate Layer, so the copy shares the source. The second uses the Action Manager to run New Smart Object via Copy.
// Photoshop ExtendScript
// Select a smart object layer before running.
var doc = app.activeDocument;
var original = doc.activeLayer;
if (original.kind !== LayerKind.SMARTOBJECT) {
alert("Select a smart object layer first.");
} else {
// Shared copy: same as Layer > Duplicate Layer
var shared = original.duplicate();
shared.name = original.name + " (shared)";
// Make the original active again, then create an independent copy:
// same as Layer > Smart Objects > New Smart Object via Copy
doc.activeLayer = original;
executeAction(stringIDToTypeID("placedLayerMakeCopy"), undefined, DialogModes.NO);
doc.activeLayer.name = original.name + " (independent)";
}After the independent copy is created, the new layer is the active layer, so the script renames that layer. If a version of Photoshop does not accept the placedLayerMakeCopy event ID, record the menu command with ScriptListener to get the ID your version uses.
File size and performance
Shared copies are cheap. The source is stored once in the document, so ten shared instances cost little more than one. Independent copies store the source each time. Ten independent copies of a large photo make a much larger PSD.
This is the main reason to prefer shared copies for repeated assets. Choose independent copies only when the contents must diverge.
Choosing between them
Use a shared copy when:
- The same artwork appears several times, such as icons, logos, or repeating textures.
- A change to the source should show up everywhere.
- You want the smaller file.
Use an independent copy when:
- You need a variation that changes the content itself, not just the transform or filters. Examples are a different color baked into the artwork or different text inside the object.
- You want to experiment on a copy without risking the original.
- One instance is about to be replaced or heavily retouched.
If the only difference is size, angle, mask, or a filter, you do not need an independent copy. Those settings are already per layer.
Common errors
- Surprise edits. You edit one shared copy and every instance changes. Undo, then use New Smart Object via Copy on the layer that should differ and redo the edit.
- Unneeded independent copies. The file grows and later source edits must be repeated in each copy. Fix this by rebuilding the layout from one source with Duplicate Layer.
- Replace Contents confusion. Replace Contents swaps the source for a selected layer. Whether other shared instances follow can vary, so test it on a small file before relying on it in a mockup.
- Linked files. Two layers can point at the same external file. Both follow changes to that file. Keep the file in a stable location so neither link breaks.
- Rasterizing. Rasterizing one shared instance converts only that layer to pixels. The remaining instances stay smart objects and keep the shared source.
Exercise
You duplicated a smart object layer with Ctrl/Cmd+J to make three copies. You edit the contents of the second copy and save, and all three layers change. You want only the third layer to keep the old artwork. How do you get that result, and why did all three change?
Show answer
All three changed because Duplicate Layer creates copies that share one source, so editing the contents of any copy updates every instance. Undo the edit. Then select the third layer and run Layer > Smart Objects > New Smart Object via Copy so it gets its own independent source. Edit the second layer's contents again. Only the layers that still share the original source will change, and the third layer keeps the old artwork.
Exercise
A poster has ten copies of a large photo smart object, and each copy only differs in scale, position, and a Gaussian Blur smart filter. The PSD is very large. What is the likely cause, and what would you change?
Show answer
The copies were probably made with New Smart Object via Copy, so each one stores its own full copy of the photo. Since the differences are only transform, position, and a smart filter, which are all per layer, shared copies would do the job. Rebuild the layout from one smart object using Duplicate Layer, and reapply the transforms and filters. The source is then stored once and the file shrinks.