Clipping Mask
What Is a Clipping Mask?
A clipping mask is a layer whose shape decides where another layer shows. Put a photo above a star in Photoshop, clip it, and the photo appears only inside the star while the rest stays hidden in the file. Designers use it to fill lettering with a photo, crop an image to a circle or keep a texture inside a shape.
The stacking order is where it gets confusing, since Photoshop and Figma want the shape below the content and Illustrator wants it on top, so a stack that clips in one app has to be swapped in another.
Stack the two layers
Pick an app and a shape, then swap the layers to see which order each app needs.
- Photo Top
- Star Bottom
From top: Photo, then Star.
Photoshop clips a layer to the layer directly below it, so the shape goes below the photo.
The photo shows only inside the star.
Which Layer Goes on Top in a Clipping Mask?
It depends on the app: Photoshop and Figma put the shape below the content, and Illustrator puts it on top. Photoshop clips a layer to the one directly below it, and a Figma mask applies to the layers above it. Illustrator works the other way round and uses the object on top as the clipping shape.
| Shape layer | Command | |
|---|---|---|
| Photoshop | Below the photo | Layer > Create Clipping Mask |
| Illustrator | On top of the photo | Object > Clipping Mask > Make |
| Figma | Below the photo | Use as mask |
How Do You Make a Clipping Mask in Photoshop?
Put the shape on one layer, place the photo on the layer directly above it, then clip the photo to the shape from the Layer menu or the Layers panel. The same four steps work for text, shapes and cut-out subjects.
Put the shape on its own layer
Type the text, draw the shape or cut out the subject on a layer of its own, since whatever this layer holds becomes the outline the photo shows through.
Place the photo directly above it
Drag the photo layer so it sits right above the shape layer, with no other layer between them in the Layers panel.
Create the clipping mask
Hold Alt (Option on a Mac) and click the divider separating the two layers, or use Layer > Create Clipping Mask from the menu bar. From then on, the photo appears only over the opaque pixels of the shape layer.
Move the photo into place
Move or resize the photo until the part you want fills the shape. To take the mask apart again, select the photo layer and choose Release Clipping Mask.
What Is a Clipping Mask Used For?
A clipping mask is used to fill lettering with a photo, give a texture the outline of a shape and keep artwork inside a frame. All three jobs come down to one layer borrowing the outline of another. Because the hidden parts stay in the file, you can still move the photo inside the shape afterward.
A photo inside lettering
Set a headline in a heavy typeface and clip a photo to it, so the picture shows through the letters. Thin strokes at a small size leave little room for the photo, so the bolder the letters, the more of the picture shows.
A texture or pattern on a shape
Clip a texture or a pattern to a logo or any other shape to give it a surface without redrawing it, and swap the texture later without touching the outline.
Artwork kept inside a frame
Clip a layout to a rectangle so nothing spills past the edge of a header, a thumbnail or the artboard.
Clipping Mask or Layer Mask: Which Should You Use?
Use a clipping mask when another layer already has the outline you need, and a layer mask when you want to hide part of a single layer. A layer mask belongs to the layer it hides, while a clipping mask takes its outline from another layer, so one shape can serve several layers at once.
Use a clipping mask for
-
A photo, color or texture that should take the outline of text or a shape
-
Several layers that should share one outline
Use a layer mask for
-
Hiding part of a single photo, such as its background
-
Letting the layers below show through parts of a photo
How Clipping Masks Work in CE.SDK
In CE.SDK, every graphic block has a shape and a fill, and the shape clips the fill. An image block with a star shape already shows the photo only inside the star, and your users can swap the shape or the photo later because the two stay separate and the whole photo stays in the block.
For lettering, the Intersect operation combines a photo block and a text block into one. Intersect keeps the fill of the bottom block, so the photo goes behind the text first. The result is a single new block with a vector outline, and the letters are now a shape instead of editable text.
// A photo in a star: give the image block a star shape.
// The shape clips the fill, and the whole photo stays in the block.
function putPhotoInStar(photo) {
engine.block.setShape(photo, engine.block.createShape('star'));
}
// A photo in lettering: combine the photo with a text block.
// Intersect keeps the fill of the bottom block, so the photo goes
// to the back first. The two blocks become one new block, and the
// letters turn into a shape instead of editable text.
async function clipPhotoToText(photo, text) {
engine.block.sendToBack(photo);
const blocks = [photo, text];
await engine.block.forceLoadResources(blocks);
if (!engine.block.isCombinable(blocks)) return null;
return engine.block.combine(blocks, 'Intersection');
} FAQs
Place the shape or text above the artwork, select both, then use Object > Clipping Mask > Make (Cmd+7, or Ctrl+7 on Windows). Object > Clipping Mask > Release takes the mask apart again.
Place the layer you want as the mask below the image, select both and pick Use as mask from the right-click menu. Figma masks the layers above a mask, so a mask that sits above the image leaves it unmasked.
The layers are usually in the wrong order for the app. Photoshop and Figma need the shape below the content and Illustrator needs it on top. In Photoshop, a layer that sits between the two without being clipped as well also breaks the mask.
No. In Photoshop, Illustrator and Figma the hidden parts stay in the file, and releasing the mask shows them again. In CE.SDK, a shape on an image block also keeps the whole photo, while Intersect replaces the blocks with one new block.
Yes. Photoshop, Illustrator and Figma all accept a text layer as the shape, so a photo fills the letters of a headline. In CE.SDK, Intersect fills text with a photo too, and the letters become a vector shape rather than editable text.
Links
Documentation and references for this concept.
Creative Editor SDK
Embed a design editor where a block's shape clips its photo, from ellipses to stars.
Combine Shapes Guide
Union, difference, intersection and XOR for graphic and text blocks in code.
Create Shapes Guide
Give a block a star, ellipse or custom path shape that clips its image fill.
Related Terms
Shape
The geometric boundary and clipping area of a graphic block: one of several types: Rect (optionally with rounded corners…
Fill
The content layer of a graphic block that defines what is visually rendered inside the block's shape boundary, one of fi…
Layer Panel
A panel that displays the full stacking order of all blocks on the current page (ordered from front to back) where users…
Blend Modes
Formulas that mix each pixel of a layer with the pixel beneath it. They come in groups: darken modes such as Multiply dr…



