<!--
{
  "documentType" : "article",
  "framework" : "QuickLook",
  "identifier" : "/documentation/QuickLook/previews-or-thumbnail-images-for-macos-10-14-or-earlier",
  "metadataVersion" : "0.1.0",
  "role" : "collectionGroup",
  "title" : "Previews or thumbnail images for macOS 10.14 or earlier"
}
-->

# Previews or thumbnail images for macOS 10.14 or earlier

Create thumbnail images or previews of common files and custom file types in earlier versions of macOS.

## Discussion

The Quick Look framework provides functionality to create a miniature representation, or *thumbnail*, of a file and its contents for display in apps that target macOS 10.14 and earlier.

If your app targets macOS 10.15 and later, use the <doc://com.apple.documentation/documentation/QuickLookThumbnailing> framework to create thumbnails. Similarly, use a Quick Look preview extension to display previews of files instead of Quick Look generators. To learn more, watch [What’s New in File Management and Quick Look](https://developer.apple.com/videos/play/wwdc2019/719).

## Topics

### Creating thumbnails

[`QLThumbnailImageCreate`](/documentation/QuickLook/QLThumbnailImageCreate(_:_:_:_:))

Creates a thumbnail image for the specified file.

[`QLThumbnailCreate`](/documentation/QuickLook/QLThumbnailCreate(_:_:_:_:))

Returns a thumbnail that’s generated in the background.

[`QLThumbnailDispatchAsync`](/documentation/QuickLook/QLThumbnailDispatchAsync(_:_:_:))

Creates a thumbnail in the background on the provided background queue.

[`QLThumbnailCancel`](/documentation/QuickLook/QLThumbnailCancel(_:))

Cancels the computation of the thumbnail.

[`QLThumbnailCopyDocumentURL`](/documentation/QuickLook/QLThumbnailCopyDocumentURL(_:))

Returns the URL of the document that you’re requesting a thumbnail for.

[`QLThumbnailCopyImage`](/documentation/QuickLook/QLThumbnailCopyImage(_:))

Returns a thumbnail image.

[`QLThumbnailCopyOptions`](/documentation/QuickLook/QLThumbnailCopyOptions(_:))

Returns the options for the requested thumbnail.

[`QLThumbnailGetContentRect`](/documentation/QuickLook/QLThumbnailGetContentRect(_:))

Returns the rectangle of the provided thumbnail image that represents the content of the document.

[`QLThumbnailGetMaximumSize`](/documentation/QuickLook/QLThumbnailGetMaximumSize(_:))

Returns the maximum allowed size for the provided thumbnail image.

[`QLThumbnailGetTypeID`](/documentation/QuickLook/QLThumbnailGetTypeID())

Returns the type identifier for the thumbnail’s opaque type.

[`QLThumbnailIsCancelled`](/documentation/QuickLook/QLThumbnailIsCancelled(_:))

Returns whether the creation of the thumbnail was canceled.

### Handling thumbnail requests

[`QLThumbnailRequestCopyContentUTI`](/documentation/QuickLook/QLThumbnailRequestCopyContentUTI(_:))

Returns the UTI for the thumbnail request.

[`QLThumbnailRequestCopyOptions`](/documentation/QuickLook/QLThumbnailRequestCopyOptions(_:))

Returns the options specified for the thumbnail request.

[`QLThumbnailRequestCopyURL`](/documentation/QuickLook/QLThumbnailRequestCopyURL(_:))

Returns the URL of the document for which the thumbnail request is requested.

[`QLThumbnailRequestCreateContext`](/documentation/QuickLook/QLThumbnailRequestCreateContext(_:_:_:_:))

Creates a graphics context to draw the thumbnail in.

[`QLThumbnailRequestFlushContext`](/documentation/QuickLook/QLThumbnailRequestFlushContext(_:_:))

Flush the graphics context and sets the thumbnail response.

[`QLThumbnailRequestGetDocumentObject`](/documentation/QuickLook/QLThumbnailRequestGetDocumentObject(_:))

Returns the object that’s stored as part of a thumbnail request.

[`QLThumbnailRequestGetGeneratorBundle`](/documentation/QuickLook/QLThumbnailRequestGetGeneratorBundle(_:))

Get the bundle of the generator receiving the thumbnail request.

[`QLThumbnailRequestGetMaximumSize`](/documentation/QuickLook/QLThumbnailRequestGetMaximumSize(_:))

Returns the maximum size (in points) specified for the thumbnail image.

[`QLThumbnailRequestGetTypeID`](/documentation/QuickLook/QLThumbnailRequestGetTypeID())

Gets the type identifier for the `QLThumbnailRequest` opaque type.

[`QLThumbnailRequestIsCancelled`](/documentation/QuickLook/QLThumbnailRequestIsCancelled(_:))

Returns whether the thumbnail request has been cancelled by the client.

[`QLThumbnailRequestSetDocumentObject`](/documentation/QuickLook/QLThumbnailRequestSetDocumentObject(_:_:_:))

Stores an object as part of a thumbnail request.

[`QLThumbnailRequestSetImage`](/documentation/QuickLook/QLThumbnailRequestSetImage(_:_:_:))

Sets the thumbnail request to a specified image.

[`QLThumbnailRequestSetImageAtURL`](/documentation/QuickLook/QLThumbnailRequestSetImageAtURL(_:_:_:))

Sets the thumbnail request to contain the image at a given URL.

[`QLThumbnailRequestSetImageWithData`](/documentation/QuickLook/QLThumbnailRequestSetImageWithData(_:_:_:))

Sets the response to the thumbnail request to image data saved within the document.

[`QLThumbnailRequestSetThumbnailWithDataRepresentation`](/documentation/QuickLook/QLThumbnailRequestSetThumbnailWithDataRepresentation(_:_:_:_:_:))

Sets the default image representation for an item with the provided data and specified file type.

[`QLThumbnailRequestSetThumbnailWithURLRepresentation`](/documentation/QuickLook/QLThumbnailRequestSetThumbnailWithURLRepresentation(_:_:_:_:_:))

Sets the default image representation for an item of a given type at the specified URL.

### Requesting previews

[`QLPreviewRequestCopyContentUTI`](/documentation/QuickLook/QLPreviewRequestCopyContentUTI(_:))

Returns the UTI for the preview request.

[`QLPreviewRequestCopyOptions`](/documentation/QuickLook/QLPreviewRequestCopyOptions(_:))

Returns the options specified for the preview request.

[`QLPreviewRequestCopyURL`](/documentation/QuickLook/QLPreviewRequestCopyURL(_:))

Returns the URL of the document for which a preview is requested.

[`QLPreviewRequestCreateContext`](/documentation/QuickLook/QLPreviewRequestCreateContext(_:_:_:_:))

Creates a graphics context to draw the preview in.

[`QLPreviewRequestCreatePDFContext`](/documentation/QuickLook/QLPreviewRequestCreatePDFContext(_:_:_:_:))

Creates a PDF context suitable to draw a multi-page preview.

[`QLPreviewRequestFlushContext`](/documentation/QuickLook/QLPreviewRequestFlushContext(_:_:))

Flush the context and sets the preview response.

[`QLPreviewRequestGetDocumentObject`](/documentation/QuickLook/QLPreviewRequestGetDocumentObject(_:))

Returns the object that’s stored as part of a preview request.

[`QLPreviewRequestSetDocumentObject`](/documentation/QuickLook/QLPreviewRequestSetDocumentObject(_:_:_:))

Stores an object as part of a preview request.

[`QLPreviewRequestGetGeneratorBundle`](/documentation/QuickLook/QLPreviewRequestGetGeneratorBundle(_:))

Get the bundle of the generator receiving the preview request.

[`QLPreviewRequestGetTypeID`](/documentation/QuickLook/QLPreviewRequestGetTypeID())

Gets the type identifier for the `QLPreviewReqest` opaque type.

[`QLPreviewRequestIsCancelled`](/documentation/QuickLook/QLPreviewRequestIsCancelled(_:))

Returns whether the preview request has been cancelled by the client.

[`QLPreviewRequestSetDataRepresentation`](/documentation/QuickLook/QLPreviewRequestSetDataRepresentation(_:_:_:_:))

Sets the preview request to data saved within the document or to dynamically generated data.

[`QLPreviewRequestSetURLRepresentation`](/documentation/QuickLook/QLPreviewRequestSetURLRepresentation(_:_:_:_:))

Sets the contents of the file at the given URL as the response to the preview request.

### Configuring the appearance of PDF previews

[`QLPreviewPDFStyle`](/documentation/QuickLook/QLPreviewPDFStyle)

A value you use to configure the appearance of previews for PDF files.

### Interfacing with a Quick Look plug-in

[`QLGeneratorInterfaceStruct`](/documentation/QuickLook/QLGeneratorInterfaceStruct)

An opaque reference that provides callbacks that the platform uses to interface with a Quick Look plug-in.

### Opaque types

[`QLThumbnail`](/documentation/QuickLook/QLThumbnail)

An opaque reference that represents a thumbnail object.

[`QLThumbnailRequest`](/documentation/QuickLook/QLThumbnailRequest)

An opaque reference that represents a thumbnail request object.

[`QLPreviewRequest`](/documentation/QuickLook/QLPreviewRequest)

An opaque reference that represents a preview request object.

### Constants

[`kQLReturnMask`](/documentation/QuickLook/kQLReturnMask)

The Quick Look generator can create a preview.

[`kQLReturnHasMore`](/documentation/QuickLook/kQLReturnHasMore)

The Quick Look generator has more content to display as part of the preview.

[`kQLThumbnailOptionIconModeKey`](/documentation/QuickLook/kQLThumbnailOptionIconModeKey)

The Quick Look generator produces the thumbnail as an icon with decor.

[`kQLThumbnailOptionScaleFactorKey`](/documentation/QuickLook/kQLThumbnailOptionScaleFactorKey)

The scale factor for the thumbnail.

[`QUICKLOOK_VERSION`](/documentation/QuickLook/QUICKLOOK_VERSION)

### Deprecated constants

[`kQLPreviewContentIDScheme`](/documentation/QuickLook/kQLPreviewContentIDScheme)

The content ID URL scheme.

[`kQLPreviewPropertyCursorKey`](/documentation/QuickLook/kQLPreviewPropertyCursorKey)

[`kQLPreviewOptionCursorKey`](/documentation/QuickLook/kQLPreviewOptionCursorKey)

[`kQLPreviewPropertyAttachmentDataKey`](/documentation/QuickLook/kQLPreviewPropertyAttachmentDataKey)

Attachment data for a preview.

[`kQLPreviewPropertyAttachmentsKey`](/documentation/QuickLook/kQLPreviewPropertyAttachmentsKey)

A list of attachments or sub-resources.

[`kQLPreviewPropertyBaseBundlePathKey`](/documentation/QuickLook/kQLPreviewPropertyBaseBundlePathKey)

A path that’s outside of the default security scope for creating a preview.

[`kQLPreviewPropertyDisplayNameKey`](/documentation/QuickLook/kQLPreviewPropertyDisplayNameKey)

A custom display name for the preview panel.

[`kQLPreviewPropertyHeightKey`](/documentation/QuickLook/kQLPreviewPropertyHeightKey)

The height in points of the preview.

[`kQLPreviewPropertyMIMETypeKey`](/documentation/QuickLook/kQLPreviewPropertyMIMETypeKey)

The web content or attachment mime type.

[`kQLPreviewPropertyPDFStyleKey`](/documentation/QuickLook/kQLPreviewPropertyPDFStyleKey)

The preferred way to display PDF content.

[`kQLPreviewPropertyStringEncodingKey`](/documentation/QuickLook/kQLPreviewPropertyStringEncodingKey)

The string encoding of the preview data.

[`kQLPreviewPropertyTextEncodingNameKey`](/documentation/QuickLook/kQLPreviewPropertyTextEncodingNameKey)

The encoding of the web content or attachment text.

[`kQLPreviewPropertyWidthKey`](/documentation/QuickLook/kQLPreviewPropertyWidthKey)

The width in points of the preview.

[`kQLThumbnailPropertyBadgeImageKey`](/documentation/QuickLook/kQLThumbnailPropertyBadgeImageKey)

An image to use for generating the badge for a file’s icon.

[`kQLThumbnailPropertyBaseBundlePathKey`](/documentation/QuickLook/kQLThumbnailPropertyBaseBundlePathKey)

A path that’s outside of the default security scope for creating a thumbnail.

[`kQLThumbnailPropertyExtensionKey`](/documentation/QuickLook/kQLThumbnailPropertyExtensionKey)

The extension to use as a badge when creating an icon.

### QuickLookUI symbols

[`QLFilePreviewRequest`](/documentation/QuickLook/QLFilePreviewRequest)

[`QLPreviewProvider`](/documentation/QuickLook/QLPreviewProvider)

[`QLPreviewReply`](/documentation/QuickLook/QLPreviewReply)

[`QLPreviewReplyAttachment`](/documentation/QuickLook/QLPreviewReplyAttachment)

[`QLPreviewItem`](/documentation/QuickLook/QLPreviewItem)

[`QLPreviewingController`](/documentation/QuickLook/QLPreviewingController)

For view based previews, the view controller that implements the QLPreviewingController protocol must at least implement one of the two following methods:
-[QLPreviewingController preparePreviewOfSearchableItemWithIdentifier:queryString:completionHandler:], to generate previews for Spotlight searchable items.
-[QLPreviewingController preparePreviewOfFileAtURL:completionHandler:], to generate previews for file URLs.

### Macros

[`QL_DEPRECATED`](/documentation/QuickLook/QL_DEPRECATED)

[`QL_EXPORT`](/documentation/QuickLook/QL_EXPORT)

[`QL_EXPORT_OSX`](/documentation/QuickLook/QL_EXPORT_OSX)

[`QL_EXTERN_C_BEGIN`](/documentation/QuickLook/QL_EXTERN_C_BEGIN)

[`QL_EXTERN_C_END`](/documentation/QuickLook/QL_EXTERN_C_END)

[`QL_FORMAT_ARG`](/documentation/QuickLook/QL_FORMAT_ARG)

[`QL_INLINE`](/documentation/QuickLook/QL_INLINE)

[`QL_NOINLINE`](/documentation/QuickLook/QL_NOINLINE)

[`QL_PRIVATE_EXPORT`](/documentation/QuickLook/QL_PRIVATE_EXPORT)

[`kQLGeneratorCallbacksInterfaceID`](/documentation/QuickLook/kQLGeneratorCallbacksInterfaceID)

[`kQLGeneratorTypeID`](/documentation/QuickLook/kQLGeneratorTypeID)

[`kQLReturnNoError`](/documentation/QuickLook/kQLReturnNoError)



---

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)