# properly scale image as border in UMG

**URL:** <https://forums.unrealengine.com/t/properly-scale-image-as-border-in-umg/1268313>\
**Category:** UI\
**Tags:** unreal-engine, editor, Blueprint, question\
**Created:** [August 22, 2023, 12:16am UTC](https://forums.unrealengine.com/t/properly-scale-image-as-border-in-umg/1268313 "2023-08-22T00:16:45Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![Everynone](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/everynone/32/1135017_2.png) [@Everynone](https://forums.unrealengine.com/u/Everynone)\
**Post date:** [August 23, 2023, 6:34am UTC](https://forums.unrealengine.com/t/properly-scale-image-as-border-in-umg/1268313/5 "2023-08-23T06:34:46Z")

</div>

> [@rubm123](#):
>
> Why does the image size have no effect?

Because UMG is not clever enough and it uses the size of the asset itself. Image size would be important were you to use a material for 9-slicing:

> [@How can i get nice unstreatched borders in UMG](https://forums.unrealengine.com/t/how-can-i-get-nice-unstreatched-borders-in-umg/1261331/3):
>
> 9-Slice. Scroll down to Setting Image States: Example: The material is drawn as a box with margins set to zero. However, no matter how I’m configuring the margin and the draw-as, I can’t get it to look good on smaller buttons: Can you show how it’s set up, and what are the sizes we’re talking about? The thing is that 9-slice only works up, you want to design the smallest possible UI elements first, and only then stretch them, preserving edges / corners intact. Material responds to I…

> The png file has 640 x 640 pixels.

.2 margin is 128px from each side. If your border is smaller than 256 in UMG, it will look distorted. As a general rule of thumb, go with the smallest image you can get away with and then scale it up.

Is the smallest element going to be 640x640 in UMG? Also, margins above .49 make little sense for a border. Make the image 64x64 and then it will look ok for _all_ sizes from 64 upwards.

---

_[View the full topic](https://forums.unrealengine.com/t/properly-scale-image-as-border-in-umg/1268313)._
