<!--
{
  "availability" : [
    "iOS: 7.0.0 -",
    "iPadOS: 7.0.0 -",
    "macCatalyst: 13.1.0 -",
    "tvOS: -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "UIKit",
  "identifier" : "/documentation/UIKit/UIActivityItemSource/activityViewController(_:thumbnailImageForActivityType:suggestedSize:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "UIKit"
    ],
    "preciseIdentifier" : "c:objc(pl)UIActivityItemSource(im)activityViewController:thumbnailImageForActivityType:suggestedSize:"
  },
  "title" : "activityViewController(_:thumbnailImageForActivityType:suggestedSize:)"
}
-->

# activityViewController(_:thumbnailImageForActivityType:suggestedSize:)

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

```
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 [`scale`](/documentation/UIKit/UIScreen/scale) for the screen. Images provided at the suggested size will result in the best experience.

## Return Value

The image to use as a preview for the item.

---

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)