How to place an image in a shape with Photoshop

Fill a Shape with a Photo in Photoshop 2022

Learn how easy it is to draw a shape and place an image inside it with Photoshop! A step-by-step tutorial for Photoshop 2022 or later.

Written by Steve Patterson.

In this tutorial, I show you how to fill a shape with an image using Photoshop. As we'll see, it's easy to place a photo into any kind of shape, from a basic rectangle or circle to a fancy custom shape. For this tutorial, we'll use a custom shape, and I'll show you how to load all of the missing shapes that are included with Photoshop so you'll have lots to choose from.

Adobe has made changes to how we draw shapes in recent Photoshop versions. So to follow along, you’ll want to be using Photoshop 2022 or later.

Here's an example of what the final effect will look like. Along with placing the image into the shape, I'll also show you how to change the background color or remove the background so you can place the shape onto any background you like.

How to place an image in a shape in Photoshop
The final image in shape effect.

Let's get started!

Download this tutorial as a print-ready PDF!

Step 1: Create a new document

Start by creating a new Photoshop document. If you are on the Home Screen, click the New file button.

Clicking the New file button on Photoshop's Home Screen
Clicking the New file button on Photoshop's Home Screen.

Or you can go up to the File menu in the Menu Bar and choose New.

Choosing New from the File menu in Photoshop
Going to File > New.

Either way opens the New Document dialog box where you can enter the settings you need in the column along the right. I’ll create a square-shaped document by setting both the Width and Height to 2000 pixels.

Since we’ll be placing an image into the shape, and images are usually saved at a higher resolution, I’ll change the Resolution value to 300 pixels per inch. And I’ll leave the Background Contents set to White.

The new Photoshop document settings
The new document settings.

Then click the Create button.

Clicking the Create button to create the new Photoshop document
Clicking Create.

And Photoshop creates the new document.

The new Photoshop document
The new document.

Step 2: Open the Shapes panel

The fastest way to draw custom shapes in Photoshop is to add them from the Shapes panel. To open it, go up to the Window menu and choose Shapes.

Opening the Shapes panel from the Window menu
Going to Window > Shapes.

The Shapes panel opens in the secondary panel column to the left of the main panels. You can show or hide the panel by clicking its icon.

Photoshop's Shapes panel opens in the secondary panel column
The Shapes panel opens in the narrow column panel.

At first, all we see are the default shapes which are divided into groups.

Photoshop's default custom shape groups
The default custom shape groups.

You can twirl any group open to view the shapes inside it by clicking the arrow next to its folder icon.

Viewing the shapes inside a group
Viewing the shapes inside a group.

And you can drag the bottom of the Shapes panel downward to expand it and view more shapes at once.

Expanding the shapes panel
Expanding the shapes panel.

Step 3: Load the missing shapes

To load all of the missing shapes that are included with Photoshop, click the Shapes panel menu icon.

Clicking the Shapes panel menu icon
Clicking the menu icon.

Then choose Legacy Shapes and More.

Loading the Legacy Shapes and More group
Loading the Legacy Shapes and More group.

A new Legacy Shapes and More group appears below the defaults.

Photoshop's Shapes panel showing the Legacy Shapes and More group
The new Legacy Shapes and More group.

And inside the group are two more groups. 2019 Shapes holds hundreds of new shapes that were added back in Photoshop 2020. And All Legacy Default Shapes holds the classic shapes from older Photoshop versions.

The 2019 Shapes and All Legacy Default Shapes groups
The 2019 Shapes and All Legacy Default Shapes groups.

Step 4: Select a shape

For this tutorial, I’ll use one of the classic shapes. I’ll twirl open the All Legacy Default Shapes group.

Opening the All Legacy Default Shapes group
Opening All Legacy Default Shapes.

Then I’ll scroll down to the Nature set and twirl it open.

Opening the Nature group
Opening the Nature group.

And inside the Nature set, I’m going to use the Butterfly shape.

Selecting the Butterfly shape
Selecting the Butterfly shape.

Step 5: Drag and drop the shape onto the canvas

To add the shape, just click and drag the shape’s thumbnail from the Shapes panel and drop it onto the canvas.

Dragging a shape from the Shapes panel onto the canvas.
Dragging a shape from the Shapes panel onto the canvas.

Photoshop draws the shape when you release your mouse button.

Photoshop draws the shape.
Photoshop draws the shape.

Step 6: Resize and center the shape

Before you resize the shape, go up to the Options Bar and make sure the link icon is selected between the Width and Height fields so that the shape’s aspect ratio is locked.

Making sure the link icon for the width and height is selected.
Making sure the width and height are linked together.

Then resize the shape by clicking and dragging any of the transform handles. If you hold the Alt (Win) / Option (Mac) key on your keyboard as you drag, you'll resize the shape from its center.

Resizing the shape by dragging a transform handle.
Dragging a handle to resize the shape.

Click and drag the shape into the center of the canvas. When you get close to the center, it should snap into place.

Dragging the shape into the center of the canvas.
Dragging the shape into the center.

Then click the checkmark in the Options Bar to accept it.

Clicking the checkmark to accept the size and position of the shape.
Clicking the checkmark.

In the Layers panel, the shape appears on its own shape layer. We know it’s a shape layer by the icon in the lower right of the thumbnail.

Photoshop's Layers panel showing the new shape layer.
The new shape layer in the Layers panel.

Step 7: Check the fill and stroke options in the Properties panel

With the shape layer selected, the Properties panel gives us access to all of the shape’s options, including the fill and stroke.

The shape options in Photoshop's Properties panel.
The fill and stroke options in the Properties panel.

By default, Photoshop uses black for the fill color, which is fine since we won’t see the color anyway once we fill the shape with the image.

But Photoshop also adds a 1 pixel black stroke around the shape.

The default fill and stroke for the shape.
The default fill and stroke.

We can add a stroke later if we want one. But for now, turn the stroke off by clicking the Stroke color swatch:

Clicking the stroke color swatch.
Clicking the stroke color swatch.

And clicking the No Color icon in the upper left of the panel. Then click outside the panel to close it, or press Enter (Win) / Return (Mac) on your keyboard.

Setting the stroke to No Color.
Setting the stroke to No Color.

Step 8: Place your image into the document

Next, we’ll place our image into the document. And because we want the image to appear in the same document as our shape, we’ll use Photoshop’s Place Embedded command.

Go up to the File menu and choose Place Embedded.

Choosing the Place Embedded command from the File menu.
Going to File > Place Embedded.

Navigate to where the image is saved on your computer. In my case, it’s in a folder on my desktop. Click on the image to select it, and then click Place.

Selecting the image to add to the shape and clicking Place.
Selecting the image and clicking Place.

Photoshop adds the image in front of the shape. If your image is larger than the document size, Photoshop resizes it to fit. The image I'm using is from Adobe Stock.

The image is placed in front of the shape.
The image is placed in front of the shape.

We’ll resize the image after we place it into the shape. So for now, click the checkmark in the Options Bar to accept it.

Clicking the checkmark in the Options Bar.
Clicking the checkmark.

Back in the Layers panel, the image appears on a new layer above the shape layer. And notice that Photoshop converted the image into a smart object, which we can tell by the smart object icon in the lower right of the thumbnail. This means that no matter how many times we resize the image, it won’t lose any quality.

Photoshop places the image as a smart object.
Photoshop places the image as a smart object.

Step 9: Create a clipping mask

At the moment, the image is sitting in front of the shape. To place it into the shape, click the Layers panel menu icon.

Clicking the Layers panel menu icon.
Clicking the Layers panel menu icon.

Then choose Create Clipping Mask.

Choosing Photoshop's Create Clipping Mask command.
Choosing the Create Clipping Mask command.

The clipping mask clips the image to the shape below it, which means that the only part of the image that remains visible is the area directly above, or in front of, the shape. Any part of the image that sits outside the shape is hidden from view, creating the illusion that the image is actually inside it.

The image is now clipped to the shape.
The result after clipping the image to the shape.

Back in the Layers panel, notice that the image layer is now indented to the right, with a small arrow pointing down at the shape layer below it. This is how Photoshop lets us know that we've created a clipping mask.

The Layers panel showing the clipping mask.
The Layers panel showing the clipping mask.

Step 10: Resize and reposition the image with Free Transform

To resize and reposition the image within the shape, go up to the Edit menu and choose Free Transform.

The image is now clipped to the shape.
The result after clipping the image to the shape.

In the Options Bar, make sure the link icon is selected between the Width and Height fields.

Making sure the link icon is selected.
Making sure the link icon is selected.

Then resize the image by dragging any of the transform handles. You can hold the Alt (Win) / Option (Mac) key on your keyboard as you drag a handle to resize the image from its center.

Resizing the image inside the shape.
Resizing the image inside the shape.

Then drag the image to position your subject within the shape. You may need to go back and forth between resizing and repositioning the image until you get it right.

Positiong the image inside the shape.
Positioning the image in the shape.

When you’re done, click the checkmark in the Options Bar.

Clicking the checkmark in the Options Bar.
Clicking the checkmark.

How to change the background color

At this point, we’ve placed the image into the shape and the main effect is done. So there are a few things we can do next. We can add a stroke around the shape, change the background color behind the shape, or remove the background completely.

I’ll start by showing you how to change the background color. And the easiest way to do that is by using a Solid Color fill layer.

Step 1: Add a Solid Color fill layer

We want the Solid Color fill layer to appear directly above the Background layer. So in the Layers panel, click on the Background layer to select it.

Selecting the Background layer in the Layers panel.
Selecting the Background layer.

Then click the New Fill or Adjustment Layer icon at the bottom of the Layers panel:

Clicking the New Fill or Adjustment Layer icon.
Clicking the New Fill or Adjustment Layer icon.

And choose Solid Color from the top of the list.

Adding a Solid Color fill layer.
Adding a Solid Color fill layer.

Step 2: Choose a new background color

Photoshop opens the Color Picker so we can choose a new color for the background. The default color is black, which definitely brings out the details of the shape. But in my case, as the background color for a butterfly, it’s too dark.

The image in shape effect with black as the background color.
The effect with black as the background color.

You can choose a different color from the Color Picker. But you can also sample a color directly from the image inside the shape. Just move your mouse cursor over the image and the cursor will change to an eyedropper. Then click on the color you want to sample.

I’ll sample a light skin tone from the girl’s forehead, and it instantly becomes the new background color.

Sampling a new background color from the image inside the shape.
Sampling a new background color from the image inside the shape.

Once you find a color you like, click OK to close the Color Picker. And back in the Layers panel, we see that the Solid Color fill layer was added between the Background layer and the shape layer above it.

Photoshop's Layers panel showing the new Solid Color fill layer.
The Layers panel showing the new Solid Color fill layer.

How to add a stroke around the shape

Another way that we can enhance the effect is by adding a stroke around the shape.

Step 1: Select the shape layer

First, in the Layers panel, click on the shape layer to select it.

Selecting the shape layer in the Layers panel.
Selecting the shape layer.

Step 2: Add a stroke layer effect

While you can add a stroke from the Properties panel, I still prefer the old way of adding them using layer effects. So with the shape layer selected, click the fx icon at the bottom of the Layers panel:

Clicking the layer effects icon in Photoshop's Layers panel.
Clicking the layer effects icon.

And choose Stroke.

Adding a Stroke layer effect.
Adding a Stroke layer effect.

Photoshop opens the Layer Style dialog box with the Stroke options in the middle column. To change the stroke's color, click the color swatch.

Clicking the stroke color swatch in Photoshop's Layer Style dialog box.
Clicking the color swatch in the Layer Style dialog box.

Then choose a new color from the Color Picker. I'll choose white by setting the R, G and B values to 255. Click OK when you're done to close the Color Picker.

Choosing white for the stroke from the Color Picker.
Choosing white for the stroke from the Color Picker.

Back in the Layer Style dialog box, set the Position to Outside so that the stroke appears around the outside of the shape. Then increase the Size value to adjust the thickness of the stroke. For my image, a size of around 18 px works well.

Setting the position and size of the stroke in the Layer Style dialog box.
Setting the position and size of the stroke.

Click OK to close the Layer Style dialog box. And here’s my result with the stroke around the shape.

The result with a white stroke added around the shape.
The result with a stroke added around the shape.

If you decide you don’t like the stroke, you can turn it off in the Layers panel by clicking the visibility icon next to the word Stroke.

Clicking the visibility icon for the stroke layer effect.
Toggle the stroke on or off by clicking the visibility icon.

How to remove the background behind the shape

Finally, let’s look at how to remove the background behind the shape so you can place the shape and the image inside it onto a different background. I’ll also show you how to save the result and which file type you need to keep the background transparent.

Step 1: Turn off the Background layer and Solid Color fill layer

First, to remove the background behind the shape, all we need to do is turn off the Background layer by clicking its visibility icon in the Layers panel.

Turning off the Background layer behind the shape.
Turning off the Background layer.

And if you added a Solid Color fill layer in the previous section, click its visibility icon to turn it off as well.

Turning off the Solid Color fill layer behind the shape.
Turning off the Solid Color fill layer.

This leaves us with transparency behind the shape, which Photoshop represents with a checkerboard pattern.

The background behind the shape is now transparent.
The background is now transparent.

Step 2: Trim away the transparent pixels

We don’t need all of the extra space surrounding the shape. So to crop it away, go up to the Image menu and choose Trim.

Selecting the Trim command in Photoshop.
Going to Image > Trim.

In the Trim dialog box, make sure Transparent Pixels is selected at the top, and that Top, Bottom, Left and Right are all selected at the bottom. Then click OK.

The settings in the Trim dialog box.
The Trim settings.

Photoshop trims away the areas around the shape.

The transparent areas around the shape have been trimmed away.
The surrounding pixels have been trimmed away.

Step 3: Save the result as a PNG file

Finally, to save the result, go up to the File menu and instead of choosing Save or Save As, choose Save a Copy.

Choosing the Save a Copy command from the File menu.
Going to File > Save a Copy.

Photoshop will ask if you want to save it to your computer or to the Cloud. I’ll choose Save on your computer.

Choosing the Save on your computer option.
Choosing the Save on your computer option.

To keep the transparency behind the shape, we can’t save it as a JPEG file because JPEG does not support transparency. Instead, we need to save it as a PNG file. So click the Save as type box on a Windows PC, or the Format box on a Mac, and choose PNG.

Setting the file type to PNG.
Setting the file type to PNG.

Then give the file a name. I’ll name it image-in-shape.png.

Naming the file before saving it.
Naming the file.

Navigate to where you want to save the file on your computer. I’ll save it to the same folder on my desktop where my image is saved. Then click the Save button.

Clicking the Save button to save the image and shape as a PNG file.
Clicking the Save button.

Finally, in the PNG Format Options dialog box, choose the Smallest file size option at the bottom and click OK.

Choosing the Smallest file size option in the PNG Format Options dialog box.
Choosing the smallest file size option.

And there we have it! That's how easy it is to place an image in a shape with Photoshop! Check out my Photo Effects section for more Photoshop effects tutorials! And don't forget, all of my Photoshop tutorials are now available to download as PDFs!