<!--
{
  "availability" : [
    "iOS: 13.0.0 -",
    "iPadOS: 13.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.15.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "QuickLookThumbnailing",
  "identifier" : "/documentation/QuickLookThumbnailing/QLThumbnailGenerator",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "Quick Look Thumbnailing"
    ],
    "preciseIdentifier" : "c:objc(cs)QLThumbnailGenerator"
  },
  "title" : "QLThumbnailGenerator"
}
-->

# QLThumbnailGenerator

An object that generates thumbnail images based on provided requirements.

```
class QLThumbnailGenerator
```

## Topics

### Getting the Generator Instance

[`sharedGenerator`](/documentation/QuickLookThumbnailing/QLThumbnailGenerator/shared)

The singleton thumbnail generator instance.

### Generating a Thumbnail

[`-  generateBestRepresentationForRequest:completionHandler:`](/documentation/QuickLookThumbnailing/QLThumbnailGenerator/generateBestRepresentation(for:completion:))

Generates the best possible thumbnail representation for a file and calls a handler upon completion.

[`-  generateRepresentationsForRequest:updateHandler:`](/documentation/QuickLookThumbnailing/QLThumbnailGenerator/generateRepresentations(for:update:))

Generates various thumbnail representations for a file and calls the update handler for each thumbnail representation.

[`Request`](/documentation/QuickLookThumbnailing/QLThumbnailGenerator/Request)

A request to generate a thumbnail for a file.

### Saving a Thumbnail

[`-  saveBestRepresentationForRequest:toFileAtURL:withContentType:completionHandler:`](/documentation/QuickLookThumbnailing/QLThumbnailGenerator/saveBestRepresentation(for:to:contentType:completion:))

Saves the best representation of thumbnail for a specific request to the specified URL.

### Canceling

[`-  cancelRequest:`](/documentation/QuickLookThumbnailing/QLThumbnailGenerator/cancel(_:))

Cancels the generation of a thumbnail for a given request.

## Relationships

### Conforms To

[`CustomDebugStringConvertible`](/documentation/Swift/CustomDebugStringConvertible)

[`CVarArg`](/documentation/Swift/CVarArg)

[`Hashable`](/documentation/Swift/Hashable)

[`CustomStringConvertible`](/documentation/Swift/CustomStringConvertible)

[`Equatable`](/documentation/Swift/Equatable)

[`NSObjectProtocol`](/documentation/ObjectiveC/NSObjectProtocol)

### Inherits From

[`NSObject-swift.class`](/documentation/ObjectiveC/NSObject-swift.class)

---

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)