Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Design Sketch Basics Sketch Features Shapes and Vectors

Hi, I want to use Sketch to import UI icons and backgrounds such as you would find on sites like Unsplash.com.

For example if I select a background image from Unsplash and download it when I upload it to Sketch the image takes over the full screen. How can I resize the image to fit a mobile screen such as an iPhone 7?

2 Answers

Rebecca Riley
PLUS
Rebecca Riley
Courses Plus Student 2,265 Points

You can make a mask for the image - just right click on the image and select "Mask". This will make a box that the image is bound to that you can resize as needed. It will not scale the image, it's more of a crop.

Katia De Juan Bayona
Katia De Juan Bayona
6,757 Points

There's 3 ways you can do that.

1. Like converting the object in which you cant to add the image into a mask MaskRebecca said,

2. Create the shape where you want to add your image, i.e a square, then on the right menu, on the "Fills" category, click on the color selector. It will open a small box to pick up a color, and at the top of that box there will be 6 squared grey icons. Click on the 5th one. It will then add a pattern to your shape by default. Now, click on "Choose Image", select the image that you want from your computer. Then below the "Choose image" button, click the dropdown and select "Fill", it will fit your image into the shape container maintaining the aspect ratio. You can have a look at this screenshot I took: https://www.dropbox.com/s/s1l5n96k037m9kx/Screen%20Shot%202017-05-18%20at%2020.33.12.png?dl=0

3. Download the Craft plugin from InVision -it is free-, and use the Data feature to add any image or text from the web to your designs, like going to Unsplash and add an image with just one click . https://www.invisionapp.com/craft#data I honestly find this plugin impressive, the functions Data and Duplicate are specially handy. :)