Skip to main content
Image(props: ImageProps): Image;

Parameters

props
ImageProps
Image configuration object.

Support

Usage

Image from bundle

Image({ name: "photo.jpg" })

System image (SF Symbol)

Image({ systemName: "star.fill" })
    .foregroundStyle(Color("yellow"))

Image from URL

Image({ url: "https://example.com/image.jpg", contentMode: "fit" })
    .resizable()
    .frame({ width: 200, height: 200 })

SVG image

Image({ svg: "<svg>...</svg>" })
    .resizable()
    .frame({ width: 100, height: 100 })

Using with Properties

Image from Property

When using an asset property type:
const properties = () => {
  asset: PropertyAsset({
    title: "Asset"
  })
}
The asset prop will contain an image key when an image is selected. It can be passed directly to the Image component:
Image(props.asset?.image)