ImageButton.ScaleType

Read Parallel

This property determines in what way the Image property is rendered when the UI element's absolute size differs from the source image's size.

By default, this property is Enum.ScaleType.Stretch which will simply stretch/compact the image dimensions so it fits the UI element's space exactly. Since transparent pixels are set to black when uploading to Roblox, transparent images should apply alpha blending to avoid a blackish outline around scaled images.

For Enum.ScaleType.Slice, when scaling up, the corners will remain the source image size. The edges of the image will stretch to the width/height of the image. Finally, the center of the image will stretch to fill the center area of the image. To learn more about 9‑sliced images, see UI 9‑Slice Design.

For Enum.ScaleType.Tile, the size of each image tile is determined by the TileSize property.