---
title: "loadImage(completionHandler:)"
framework: gamekit
role: symbol
role_heading: Instance Method
path: "gamekit/gkachievementdescription/loadimage(completionhandler:)"
---

# loadImage(completionHandler:)

Loads the image to display when the player completes the achievement.

## Declaration

```swift
func loadImage(completionHandler: (@Sendable (UIImage?, (any Error)?) -> Void)? = nil)
```

```swift
func loadImage() async throws -> UIImage
```

```swift
func loadImage(completionHandler: (@Sendable (NSImage?, (any Error)?) -> Void)? = nil)
```

```swift
func loadImage() async throws -> NSImage
```

## Parameters

- `completionHandler`: A block that GameKit calls when this method completes the download. The block receives the following parameters:

## Mentioned in

Rewarding players with achievements

## Discussion

Discussion First, use the loadAchievementDescriptions(completionHandler:) method to download the achievement description objects, and then use this method to download the individual achievement images. While GameKit downloads an achievement image, you can display the placeholder image. If successful, GameKit sets the image property to the image it passes to the completion handler.

## See Also

### Working with Achievement Images

- [incompleteAchievementImage()](gamekit/gkachievementdescription/incompleteachievementimage().md)
- [placeholderCompletedAchievementImage()](gamekit/gkachievementdescription/placeholdercompletedachievementimage().md)
