Method 1: Clipping Mask (Recommended for Flexibility)
This is the most common and flexible method. It allows you to easily resize, move, and edit the image and shape separately without permanently altering either.
1. Create Your Shape:
* Use the Shape Tools (Rectangle Tool, Ellipse Tool, Polygon Tool, etc.) from the toolbar on the left to draw your desired shape on a new layer.
* Make sure your shape is a vector shape layer, not a pixel-based one. You can check in the Layers panel; it should have a shape icon (a square with curves).
* Set the `Fill` color in the Properties panel (Window > Properties) or the options bar at the top when a Shape Tool is selected. It doesn't matter *which* color, just that it *has* a color. A common mistake is to leave the `Fill` set to "None" (the white square with a red line).
2. Place Your Image:
* Open the image you want to use.
* Go to File > Place Embedded... and select the image file.
* This places the image as a Smart Object, which helps preserve its quality if you resize it.
* Alternatively, you can copy and paste the image from another document into your current document. If you do this, it will likely become a regular raster layer instead of a Smart Object. Convert it to a Smart Object by right-clicking the image layer in the Layers panel and choosing "Convert to Smart Object."
3. Position the Image Above the Shape:
* In the Layers panel, drag the image layer so that it is directly *above* the shape layer. The order is crucial.
4. Create the Clipping Mask:
* Option 1 (Right-Click Method): Right-click on the *image layer* in the Layers panel and choose "Create Clipping Mask."
* Option 2 (Menu Method): Select the *image layer* in the Layers panel. Go to Layer > Create Clipping Mask.
* Option 3 (Keyboard Shortcut): Select the *image layer* in the Layers panel and press Alt + Ctrl + G (Windows) or Option + Command + G (Mac).
5. Adjust and Refine:
* Now, the image is visible only within the boundaries of the shape.
* Move the Image: Select the *image layer* and use the Move Tool (V) to reposition the image within the shape to get the desired composition.
* Resize the Image: Select the *image layer* and use Edit > Transform > Scale (or Ctrl/Cmd + T) to resize the image. Hold Shift while scaling to constrain proportions. Since it's a Smart Object, resizing won't degrade the image quality as much.
* Move the Shape: Select the *shape layer* and use the Move Tool (V) to reposition the shape and the clipped image together.
* Resize the Shape: Select the *shape layer* and use Edit > Transform > Scale (or Ctrl/Cmd + T) to resize the shape.
Pros:
* Non-destructive: The original image and shape are preserved. You can undo the clipping mask at any time.
* Flexible: Easy to move, resize, and edit the image and shape independently.
* Reusable: The same image can be used in multiple shapes, or the same shape can be used with multiple images.
Cons:
* Can be slightly more steps than other methods.
Method 2: Quick Selection and Fill (Destructive)
This method is simpler but less flexible. It permanently alters the image.
1. Create Your Shape (Rasterize):
* Create your shape using the Shape Tools as described in Method 1.
* Important: Rasterize the shape layer. Right-click on the shape layer in the Layers panel and choose "Rasterize Layer." This converts it from a vector shape to a pixel-based layer.
2. Select the Shape:
* Hold down Ctrl (Windows) or Cmd (Mac) and click on the thumbnail of the *rasterized shape layer* in the Layers panel. This will load the shape's transparency as a selection. You'll see the "marching ants" around your shape.
3. Select the Image:
* Select the *image layer* in the Layers panel.
4. Fill the Selection:
* Go to Edit > Fill....
* In the Fill dialog box:
* Set "Contents" to "Use: Color" or "Use: Pattern," depending on whether you want to fill it with a solid color or a pattern. If you want to use the selected image, you need to follow steps 5-6 instead.
* Set "Blending" to "Normal".
* Set "Opacity" to "100%".
* Click "OK."
* If you want to directly paste the image into the selection, skip to steps 5-6.
5. Invert the Selection
* Go to Select > Inverse or press Shift + Ctrl + I (Windows) or Shift + Cmd + I (Mac)
6. Delete the area surrounding the shape.
* Press Delete (Windows) or Backspace (Mac). This deletes everything *outside* the selection on the image layer, leaving only the portion inside the shape.
7. Deselect: Go to Select > Deselect or press Ctrl + D (Windows) or Cmd + D (Mac).
Pros:
* Relatively quick.
Cons:
* Destructive: The original image is altered. You cannot easily change the image or the shape later without starting over.
* Lower Quality: Because the shape is rasterized, scaling it up can lead to pixelation.
* Less Flexible: Repositioning the image within the shape is more difficult.
Method 3: Layer Mask (Good for Fading/Blending Edges)
This method is also non-destructive and useful for creating more complex effects, like fading the image at the edges of the shape.
1. Create Your Shape: Follow the steps in Method 1 to create your shape on a new layer.
2. Place Your Image: Follow the steps in Method 1 to place your image *above* the shape layer in the Layers panel.
3. Create a Layer Mask:
* Select the *image layer* in the Layers panel.
* Go to Layer > Layer Mask > Reveal Selection. (If you don't have a selection yet, proceed to Step 4)
4. Load Shape as a Selection (If you skipped step 3)
* Hold down Ctrl (Windows) or Cmd (Mac) and click on the thumbnail of the *shape layer* in the Layers panel. This will load the shape's transparency as a selection. You'll see the "marching ants" around your shape.
* Go to Layer > Layer Mask > Reveal Selection.
5. Understanding the Layer Mask:
* A white mask reveals the image. A black mask hides the image.
* You can paint on the mask with black or white to selectively hide or reveal portions of the image. Use the Brush Tool (B).
* Make sure you are painting on the *layer mask* thumbnail in the Layers panel, not the image thumbnail. Click on the mask thumbnail to select it.
6. Edit the Layer Mask (Optional):
* Hard Edges: If you want a sharp, clean edge matching the shape, you're done.
* Soft Edges/Fading: To soften the edges, use a soft-edged brush with low opacity to paint on the mask with black near the edges of the shape. This will gradually fade the image into the background. You can also apply a blur filter to the mask (Filter > Blur > Gaussian Blur).
Pros:
* Non-destructive: The original image and shape are preserved. You can edit the mask at any time.
* Flexible: Allows for complex masking effects, like fading, blending, and intricate shapes.
* Precise Control: You have fine-grained control over which parts of the image are visible.
Cons:
* Can be more complex than the Clipping Mask method, especially for beginners.
Key Considerations:
* Smart Objects: Placing images as Smart Objects (via *File > Place Embedded...*) is generally recommended. They retain their original quality even when scaled or transformed, preventing pixelation.
* Vector vs. Raster: Vector shapes (created with the Shape Tools and *not* rasterized) can be scaled infinitely without losing quality. Rasterized shapes become pixel-based and can become blurry if scaled up significantly.
* Layer Order: The order of layers in the Layers panel is crucial. The image layer must be above the shape layer for the Clipping Mask and Layer Mask methods to work correctly.
* Non-Destructive Editing: The Clipping Mask and Layer Mask methods are preferred because they allow you to easily change your mind and make adjustments later without permanently altering the original image. This is important for flexibility and error correction.
Choose the method that best suits your needs based on the complexity of the effect you want to achieve and your comfort level with Photoshop. For most basic image-filled shapes, the Clipping Mask method is the best starting point. Remember to experiment and practice to become comfortable with these techniques!