Mobile app version of vmapp.org
Login or Join
Rivera951

: Exporting a slice in Sketch with transparent background around Using Sketch 3 want to export an icon, the icons themselves are 24x24 but they sit within an area of 32x32. I've figured out how

@Rivera951

Posted in: #Export #SketchApp

Using Sketch 3 want to export an icon, the icons themselves are 24x24 but they sit within an area of 32x32.

I've figured out how to do it by combining two different layers one 24x24 and the other 32x32 but it's a tedious process. I need to do this for every single icon.

Is there a faster workflow?

10.05% popularity Vote Up Vote Down


Login to follow query

More posts by @Rivera951

5 Comments

Sorted by latest first Latest Oldest Best

 

@Debbie163

It's actually very easy if you know how to do it :)

Suppose you have an icon that is 24x24px and you want the png to be 32x32px. You have to create a slice over the icon. The slice must be 32x32px. Then group the slice and the icon together. Last but not least: click on the slice and in the inspector you will see something like this:



Make sure you check "Export Group Contents Only". The other options must be unchecked.

This way, you will export a transparent png, even if there isn't a transparent background under the icon.

10% popularity Vote Up Vote Down


 

@Carla748

This method worked for me: Place the correct size slice layer above the layer your icon is on and make sure they are not grouped.

Hope it helps

10% popularity Vote Up Vote Down


 

@Hamaas979

Use this to export your assets. The issue with Sketch itself and most other plugins is that it neglects invisible layers while exporting. As a result, invisible bounds do not work.

I even tried to decrease a bound's opacity to 0 so to try to trick Sketch into exporting it. But Sketch's native export isn't so naive.

You might see a horde of plugins of Sketch that help in exporting assets for Android easily. They might reduce the steps involved, but it doesn't solve the bounds problem.

This one does.
github.com/GeertWille/sketch-export-assets
It allows you to export assets for iOS, Android and Windows for all resolutions while keeping the bounds intact.

Saves all that artboard efforts.

10% popularity Vote Up Vote Down


 

@Cody3331749

If you want to export only the icon layer (24x24) just drag the layer to the desktop.

10% popularity Vote Up Vote Down


 

@Frith110

Hit A to create an Artboard, select the size (or set your own by clicking the + in the bottom right) and start exporting. No need to create extra layers.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme