<!--
{
  "availability" : [
    "macOS: 10.0.0 - 12.0.0"
  ],
  "documentType" : "symbol",
  "framework" : "QuickLook",
  "identifier" : "/documentation/QuickLook/QLThumbnailRequestSetImage(_:_:_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Function",
  "symbol" : {
    "kind" : "Function",
    "modules" : [
      "Quick Look"
    ],
    "preciseIdentifier" : "c:@F@QLThumbnailRequestSetImage"
  },
  "title" : "QLThumbnailRequestSetImage(_:_:_:)"
}
-->

# QLThumbnailRequestSetImage(_:_:_:)

Sets the thumbnail request to a specified image.

```
func QLThumbnailRequestSetImage(_ thumbnail: QLThumbnailRequest!, _ image: CGImage!, _ properties: CFDictionary!)
```

## Parameters

`thumbnail`

The thumbnail request object.

`image`

The image object to be used as the thumbnail of the document.

`properties`

A dictionary of properties for the thumbnail. macOS doesn’t use any properties.

## Discussion

You call this function to have Quick Look use the `CGImage` object supplied in `image` as the thumbnail. Call [`QLThumbnailRequestGetMaximumSize(_:)`](/documentation/QuickLook/QLThumbnailRequestGetMaximumSize(_:)) to get the maximum allowed size for thumbnail and resize it if necessary before calling `QLThumbnailSetImage`.

### Special Considerations

Thread-safety: This function should be called in the same thread as the thumbnail request is made in; generally, this is the same thread in which the `GenerateThumbnailForURL` callback was invoked.

---

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)