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

# QLThumbnailImageCreate(_:_:_:_:)

Creates a thumbnail image for the specified file.

```
func QLThumbnailImageCreate(_ allocator: CFAllocator!, _ url: CFURL!, _ maxThumbnailSize: CGSize, _ options: CFDictionary!) -> Unmanaged<CGImage>!
```

## Parameters

`allocator`

The allocator to use to create the thumbnail image.

`url`

The URL of the file to create a thumbnail image for.

`maxThumbnailSize`

The maximum desired size of the thumbnail image.

`options`

A dictionary of options that affect the creation of the thumbnail image. You can use [`kQLThumbnailOptionIconModeKey`](/documentation/QuickLook/kQLThumbnailOptionIconModeKey) and [`kQLThumbnailOptionScaleFactorKey`](/documentation/QuickLook/kQLThumbnailOptionScaleFactorKey) as options.

## Return Value

The thumbnail image, or `NULL` if Quick Look doesn’t support this file type.

## Discussion

This function doesn’t supplant the use of Icon Services by apps to get generic file icons and custom icons stored in the metadata fork of files.

### Special Considerations

This function is thread-safe, so you can call it from any thread. However, because it’s synchronous, you should generally call it in a background thread.

---

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)