---
title: "fetchUIImage(completion:)"
framework: intents
role: symbol
role_heading: Instance Method
path: "intents/inimage/fetchuiimage(completion:)"
---

# fetchUIImage(completion:)

Fetches the image and provides it to the specified completion handler.

## Declaration

```swift
func fetchUIImage(completion: @escaping @Sendable (UIImage?) -> Void)
```

```swift
func fetchUIImage() async -> UIImage?
```

## Parameters

- `completion`: The completion handler that executes when the image is available. The handler has no return value and takes the following parameter:

## Discussion

Discussion Use this method to fetch an instance of UIImage that contains the corresponding image data. Provide a completion handler; otherwise, calling this method does nothing. The handler executes on the same thread that invokes the method.
