<!--
{
  "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/Request/init(fileAt:size:scale:representationTypes:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "Quick Look Thumbnailing"
    ],
    "preciseIdentifier" : "c:objc(cs)QLThumbnailGenerationRequest(im)initWithFileAtURL:size:scale:representationTypes:"
  },
  "title" : "init(fileAt:size:scale:representationTypes:)"
}
-->

# init(fileAt:size:scale:representationTypes:)

Creates a new request for a thumbnail with the specified parameters for a file at a provided URL.

```
init(fileAt url: URL, size: CGSize, scale: CGFloat, representationTypes: QLThumbnailGenerator.Request.RepresentationTypes)
```

## Parameters

`url`

The URL of the file for which you want to create a thumbnail.

`size`

The desired size of the thumbnails.

`scale`

The scale of the thumbnails. This parameter usually represents the scale of the current screen. However, you can pass a screen scale to the initializer that isn’t the current device’s screen scale. For example, you can create thumbnails for different scales and upload them to a server in order to download them later on devices with a different screen scale.

`representationTypes`

The different thumbnail types. For a list of all possible thumbnail representation types, see [`QLThumbnailGenerator.Request.RepresentationTypes`](/documentation/QuickLookThumbnailing/QLThumbnailGenerator/Request/RepresentationTypes-swift.struct).

## Return Value

An initialized request object to create a thumbnail for a file.

---

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)