Home / Articles / Adding Images and Text

Adding Images and Text

Chapter Description

In this sample chapter from Adobe XD CC Classroom in a Book (2018 release), learn how to import and transform images, plus add or format text.

Masking content

You can easily hide portions of images or shapes (paths) using two different methods of masking in Adobe XD: mask with shape or image fill. Masks are nondestructive, which means that nothing that is hidden by the mask is deleted. In the case of a mask with a shape, you can adjust the mask, if required, to highlight another portion of the masked content.

Masking with a shape or path

The first method for masking you will learn is masking with a shape. This method of masking (hiding) portions of artwork or images is similar to masking in a program like Illustrator. The mask is either a closed path (shape) or an open path (like a path in the shape of an “s,” for instance). To mask content, the masking object is on top of the object to be masked. Next, you’ll mask a portion of an image.

  1. Press Command+0 (macOS) or Ctrl+0 (Windows) to show all.

  2. With the Select tool (07com04.jpg) selected, drag the “ocean_masked” image onto the “Nearby spots” artboard.

  3. Click the artboard name “Nearby spots” (above the artboard) to select it. Press Command+3 (macOS) or Ctrl+3 (Windows) to zoom in to the artboard.

  4. Click to select the ocean_masked image again. Drag any corner of the new image toward the center to make it smaller. Stop dragging when you see roughly 90 for the Height in the Property inspector.

  5. Press Command+3 (macOS) or Ctrl+3 (Windows) to zoom in to the image.

  6. Select the Rectangle tool (box.jpg) in the toolbar. Starting at the top edge of the image, Shift-drag down and to the right to make a rectangle that has a height and width of approximately 90. Release the mouse button and then the key.

  7. Press the letter V to select the Select tool. With the shape still selected, Shift-click the image behind the shape you just drew to select both. Select Object > Mask with Shape (macOS) or right-click and select Mask with Shape from the menu that appears (Windows).

  8. With the Layers panel open (Command+Y [macOS] or Ctrl+Y [Windows]), and the image still selected on the artboard, you’ll see “Mask Group 1” in the Layers panel list. The mask shape and the object that is masked are now part of a group.

Editing a mask

When you mask something, you may later want to crop the image in a different way, revealing more or less of that image. When you mask with a shape, like you did in the previous section, you can easily edit both the mask and the object masked. Next, you’ll change how the image from the previous section is masked.

  1. With the Select tool (07com04.jpg) selected and the image still selected, double-click the image to enter mask editing mode.


    Double-clicking a masked object will temporarily show the mask and the masked object (the image, in this instance) in the window. This way, you can edit either the mask or the object that is masked.

  2. Click in the image area, and drag to reposition the image (not the shape).


    As you drag, you are changing what is masked by the now visible rectangle mask. You could transform the image in different ways, or you could select the shape that is the mask (the rectangle, in this case), and reposition or resize it. You can also copy and paste other content into the mask.

  3. Press Esc to exit the mask editing mode. The image is once again masked.

  4. Press Command+0 (macOS) or Ctrl+0 (Windows) to show all.

  5. Click in a blank area away from the artboards to deselect the image.

  6. Choose File > Save (macOS) or click the menu icon (menu_icon.jpg) in the upper-left corner of the application window and choose Save (Windows).

Masking with an image fill

Another method for masking is to drag and drop an image into an existing shape or path. The image becomes the fill of the shape and is always centered. This method of masking is great when adding design content to a low-fidelity wireframe, for instance, but there isn’t quite as much editing capability as with the shape-masking method you learned about in the previous sections. Next, you’ll import a new image for a profile picture and mask it with a shape.

  1. Double-click the artboard icon (artboardicon.jpg) to the left of the artboard name “Detail” in the Layers panel to fit the artboard in the document window.

  2. Select the Rectangle tool (box.jpg) in the toolbar. Shift-drag on the Detail artboard to create a square. Release the mouse button and then the key when you see a width and height of approximately 160 in the Property inspector.

  3. Go to the Finder (macOS) or Windows Explorer (Windows), open the Lessons > Lesson04 > images folder, and leave the folder open. Go back to XD. With XD and the folder showing find the image named “alnie.jpg” in the folder, and drag the image on top of the square you drew in the Detail artboard. When the square is highlighted in blue, release the mouse button to drop the image into the frame.

    By dragging an image onto a shape, the image becomes the fill of the shape.

Editing an image fill mask

Dropping an image into a shape so that it becomes the fill of the shape means the image is always centered in the shape. Next, you’ll explore the editing capabilities of this type of mask.

  1. With the Select tool (07com04.jpg) selected and the masked image still selected, drag the upper-right point of the frame down and to the right.

    The image will remain centered in the shape and resizes proportionally to fill the shape. Also notice the shape has corner widgets for rounding the corners.

  2. Ensure that the Lock Aspect option (fog.jpg) is off in the Property inspector. Change the Width to 155 and the Height to 155.

  3. Double-click the image to enter Path Edit mode and see the anchor points.

  4. Click to select any of the corner anchor points and drag to change the shape.

    This is very different from the mask you created in the previous sections, where you drew the shape first. In this case, you cannot edit the image within the shape; you can only edit the shape that the image is filling. As you change the shape, notice that the image stays in the center and also continues to fill the frame proportionally.

  5. Press Command+Z (macOS) or Ctrl+Z (Windows) as many times as necessary to return the shape to a square.

  6. Press Esc to stop editing the anchor points.

  7. Choose File > Save (macOS) or click the menu icon (menu_icon.jpg) in the upper-left corner of the application window and choose Save (Windows).

4. Working with text | Next Section Previous Section

There are currently no related articles. Please check back later.