<!--
{
  "availability" : [
    "iOS: 18.1.0 -",
    "iPadOS: 18.1.0 -",
    "macCatalyst: 18.1.0 -",
    "macOS: 15.1.0 -",
    "visionOS: 2.4.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "ImagePlayground",
  "identifier" : "/documentation/ImagePlayground/ImagePlaygroundViewController/sourceImage",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "Image Playground"
    ],
    "preciseIdentifier" : "c:@M@ImagePlayground@objc(cs)ImagePlaygroundViewController(py)sourceImage"
  },
  "title" : "sourceImage"
}
-->

# sourceImage

An image to use as source input for generating the new image.

iOS, iPadOS, Mac Catalyst, visionOS:

```
@MainActor @objc @preconcurrency var sourceImage: UIImage? { get set }
```

macOS:

```
@MainActor @objc @preconcurrency var sourceImage: NSImage? { get set }
```

## Discussion

If you have an existing image that you want to use as a starting
point for the new image, add it to this property. If you don’t
supply a source image, the system creates the new image from
the prompt text you provide.

Typically, you provide an image big enough to fit the device’s display.
The expected minimum size is 384 x 384 pixels, and the recommended
maximum size is 4096 x 4096 pixels.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)