---
title: "activityViewController(_:thumbnailImageForActivityType:suggestedSize:)"
framework: uikit
role: symbol
role_heading: Instance Method
path: "uikit/uiactivityitemsource/activityviewcontroller(_:thumbnailimageforactivitytype:suggestedsize:)"
---

# activityViewController(_:thumbnailImageForActivityType:suggestedSize:)

For activities that support a preview image, returns a thumbnail preview image for the item.

## Declaration

```swift
optional func activityViewController(_ activityViewController: UIActivityViewController, thumbnailImageForActivityType activityType: UIActivity.ActivityType?, suggestedSize size: CGSize) -> UIImage?
```

## Parameters

- `activityViewController`: The activity view controller object requesting information about the data item.
- `activityType`: The selected activity type.
- `size`: The suggested size for the thumbnail image, in points. You should provide an image using the appropriate doc://com.apple.uikit/documentation/UIKit/UIScreen/scale for the screen. Images provided at the suggested size will result in the best experience.

## Return Value

Return Value The image to use as a preview for the item.

## See Also

### Providing information about the data items

- [activityViewController(_:subjectForActivityType:)](uikit/uiactivityitemsource/activityviewcontroller(_:subjectforactivitytype:).md)
- [activityViewController(_:dataTypeIdentifierForActivityType:)](uikit/uiactivityitemsource/activityviewcontroller(_:datatypeidentifierforactivitytype:).md)
