Assets and Adobe XD
In the previous lesson, you explored creating, importing, and editing vector graphics. In this lesson, you’ll learn about the different types of image assets you can import into Adobe XD, the different methods for bringing them in from programs like Photoshop and Sketch, and how to work with them to fit your design.
When it comes to images, Adobe XD supports PSD, AI, PNG, GIF, SVG, JPEG, and TIFF images. In Adobe XD, images (both raster and vector) that you import are embedded in the XD file, since there is no image-linking workflow, by default, as you would find in Adobe InDesign.
Importing an image
In Adobe XD, there are several methods for adding assets to your projects. In this section, you’ll import a few assets into your design using the Import command.
Choose File > Open From Your Computer (macOS) or click the menu icon (
) in the upper-left corner of the application window and choose Open From Your Computer (Windows). Open the Travel_Design.xd document in the Lessons folder (or where you saved it).
Press Command+0 (macOS) or Ctrl+0 (Windows) to see all of the content.
With the Select tool (
) selected, click the Home artboard in the document window.
Choose File > Import (macOS) or click the menu icon (
) in the upper-left corner of the application window and choose Import (Windows). Navigate to the Lessons > Lesson04 > images folder. Click to select the image named home_1.jpg. Click Import.
JPEG images you import into Adobe XD are placed at half size. That means a JPEG that is 400 pixels x 400 pixels will be placed at 200 pixels x 200 pixels. The image is placed in the center of the selected artboard and is larger than the artboard. Any image content that is outside the bounds of the artboard is hidden. With the image selected, XD shows the masked content as semi-transparent to give you a preview of what is hidden.
With the Select tool (
) selected, drag the image until the bottom edge snaps to the bottom edge of the artboard, and ensure that it’s still centered on the artboard (a vertical aqua guide will appear when it’s centered).
Drag the top-middle handle of the image down until the image is as tall as the artboard.
The proportions of raster images are maintained when resizing by dragging.
Right-click the image and choose Send To Back (macOS) or Arrange > Send To Back (Windows) to arrange the image behind the other content on the Home artboard.
Click away from the image, in a blank area of the document window, to deselect it. You should now see that the image content that is outside the bounds of the artboard is hidden.
Importing multiple assets
In Adobe XD, you can import multiple assets using a variety of methods. In this section, you’ll import an SVG file and a PNG using the Import command.
Choose File > Import (macOS) or click the menu icon (
) in the upper-left corner of the application window and choose Import (Windows). Navigate to the Lessons > Lesson04 > images folder. Click to select the image named journal_header.png and Command-click (macOS) or Ctrl-click (Windows) the image named red_map.svg. Click Import.
Both assets are placed next to each other, in a row, in the center of the document window. Any imported assets that touch an artboard are placed on that artboard. If a placed image doesn’t overlap the first artboard, it will be placed on the next artboard to the right, and so on. Images that don’t overlap an artboard will be placed on the empty pasteboard.
Drag one of the assets down to drag them both away from the artboards.
With the Select tool selected, click in a blank area away from the selected assets to deselect them. Click the red map artwork to select it.
Right-click the selected map artwork and choose Cut. Right-click in the Countdown artboard and choose Paste.
Drag the other image you placed, journal_header.png, from its center, into the middle of the Journal artboard. Make sure the pointer is within the bounds of the Journal artboard and release the mouse button.
The image is placed on the Journal artboard and is cropped by the bounds of the artboard.
Importing assets via drag and drop
Another method for bringing assets into Adobe XD is to drag and drop from the Finder (macOS) or File Explorer (Windows). This is a great way to insert images into existing frames (as you’ll see in a later section, “Masking with an image fill”) or as a more precise placement option.
With the Select tool (
) selected, click in a blank area away from the artboards to deselect all.
Go to the Finder (macOS) or File Explorer (Windows), open the Lessons > Lesson04 > images folder, and leave the folder open. Go back to XD. With XD and the folder showing, click the image named scene_1.png.
Command-click (macOS) or Ctrl-click (Windows) the image named scene_2.png to select both images. Release the key and drag either of the selected images into XD, just below the Home artboard.
Both images are placed next to each other on the pasteboard as a row of images. If you were to release the mouse button over an artboard, any images that touch the artboard would be placed on that artboard. Images that don’t overlap an artboard will be placed on the empty pasteboard.
Click in Adobe XD to make it the focus again, if necessary.
Replacing an image
If you need to replace an image in your design, you can do so by dragging an image from your desktop onto an existing image to replace it. Next, you’ll replace a copy of an image in your design.
Go to the Finder (macOS) or Windows Explorer (Windows), open the Lessons > Lesson04 > images folder, and leave the folder open in the Finder window (macOS) or Windows Explorer (Windows). Go back to XD.
With XD and the folder showing, click the image named home_2.jpg. Drag the image on top of the home_1.jpg image on the Home artboard. When it shows a blue highlight, release the mouse button to replace the image.
The image will fill the shape proportionally and will most likely be masked by the shape (parts of the new image may be hidden). This may mean that the new image is scaled if the image you are replacing is larger or smaller than the image you are dragging in.
With the image on the Home artboard selected, press Command+C (macOS) or Ctrl+C (Windows) to copy it. With the Select tool selected, click in a blank area of the Hike Detail artboard to make it the active artboard. Press Command+V (macOS) or Ctrl+V (Windows) to paste it.
Content copied from one artboard to another is pasted in the same position, relative to the upper-left corner. In Lesson 5, “Organizing Content,” you’ll see how to arrange content and work with layering to get the new image behind the content you pasted from the iOS UI kit in Lesson 3, “Creating and Importing Graphics.”
Transforming images
Images you import into Adobe XD can be transformed in a variety of ways—from scaling and rounding corners to rotating and positioning. In this section, you’ll apply a few transformations to the images you’ve imported so far.
Click the image on the Journal artboard.
Press Command+3 (macOS) or Ctrl+3 (Windows) to zoom in to the selection.
Press Command and – (macOS) or Ctrl and – (Windows) once to zoom out.
Notice the corner widgets (
) in the corners of the image. As with vector shapes you draw, you can also round the corners on an image or in the Property Inspector. For more information on rounding corners, refer to the Lesson 3 section “Rounding corners.”
Drag the image to reposition it. Notice that as you drag, if an edge of the image comes close to an artboard edge, it snaps. As you drag, press the Command (macOS) or Ctrl (Windows) key to temporarily turn off snapping. Position the image as you see in the following figure. Release the mouse button and then the key.
Drag the lower-left bounding point of the box around the image up and to the right to make it smaller. Make sure it’s still a little wider than the artboard.
With the image in place, next you’ll transform another by scaling and rotating.
Zoom out, using any method, far enough to see the Recording artboard.
Drag across the topographic map artwork on the Recording artboard to select all of it. Move the pointer just off any corner of the selected artwork. When the rotate arrow (
) appears, drag counterclockwise to rotate the artwork. When you see approximately –10° in the rotation angle of the Property Inspector, release the mouse button.
As you rotate, the Rotation value will change in the Property Inspector. You can also edit the Rotation value in the Property Inspector to rotate an object.
Shift-drag the lower-right corner away from the center to make it larger, ensuring that the artwork covers the bottom part of the artboard. Release the mouse button and then the key.
Press Command+0 (macOS) or Ctrl+0 (Windows) to see everything.
Click the image at the top of the Journal artboard to select it. Change the X value to 0 and press Return or Enter. Leave the Y value (vertical position) as is in the Property Inspector. Leave the image selected.
The X (horizontal) value and Y (vertical) value each start at zero (0) in the upper-left corner of each artboard. Content such as the image, in this case, is positioned from its upper-left corner relative to the upper-left corner of the artboard. Positioning content using the X and Y values can help you work more precisely.
Resizing an image in its frame
Images you bring into XD are contained within a frame. When you transform an image frame, the image is transformed as well. You can also select the image within the frame and transform it separately. Next, you’ll resize an image within its frame. This can be an easy way to hide parts of an image you don’t want showing.
With the image at the top of the Journal artboard still selected, zoom in to the selected image by pressing Command+3 (macOS) or Ctrl+3 (Windows) or by using any other method you’ve learned up to this point.
Double-click the image to reveal bounding points around it.
The points you see around the perimeter of the image are used to resize the image within the frame. Currently you can’t edit the individual anchor points for the shape of the image frame. The corner radius widgets that you saw previously in the image corners are now gone. When you edit the image within the frame, you can no longer edit the corner radius of the corners.
Later in this lesson, you’ll learn about masking an image with a shape. In that case, you will be able to edit the frame or the image within the frame.
Drag the bottom-middle point of the image down to make it larger within the frame.
The bottom part of the image will be hidden when you drag beyond the edge of the frame it’s in.
Press the Esc key to stop resizing the image and show the bounding box of the image again.
Drag the lower-right point of the bounding box toward the center of the image to make it a bit smaller. Make sure it still covers the width of the artboard.
Press Command+0 (macOS) or Ctrl+0 (Windows) to see everything.
Choose File > Save (macOS) or click the menu icon (
) in the upper-left corner of the application window and choose Save (Windows).