<!--
{
  "availability" : [
    "iOS: 4.0.0 -",
    "iPadOS: 4.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.4.0 -",
    "tvOS: 9.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 2.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "ImageIO",
  "identifier" : "/documentation/ImageIO/kCGImageSourceCreateThumbnailFromImageIfAbsent",
  "metadataVersion" : "0.1.0",
  "role" : "Global Variable",
  "symbol" : {
    "kind" : "Global Variable",
    "modules" : [
      "Image I/O"
    ],
    "preciseIdentifier" : "c:@kCGImageSourceCreateThumbnailFromImageIfAbsent"
  },
  "title" : "kCGImageSourceCreateThumbnailFromImageIfAbsent"
}
-->

# kCGImageSourceCreateThumbnailFromImageIfAbsent

A Boolean value that indicates whether to create a thumbnail image automatically if the data source doesn’t contain one.

```
let kCGImageSourceCreateThumbnailFromImageIfAbsent: CFString
```

## Discussion

The value of this key is a <doc://com.apple.documentation/documentation/CoreFoundation/CFBoolean>. The default value is <doc://com.apple.documentation/documentation/CoreFoundation/kCFBooleanFalse>.

If you set the value of this key to <doc://com.apple.documentation/documentation/CoreFoundation/kCFBooleanTrue>, the image source creates the thumbnail from the full image, subject to the limit specified by [`kCGImageSourceThumbnailMaxPixelSize`](/documentation/ImageIO/kCGImageSourceThumbnailMaxPixelSize). If you don’t specify a maximum pixel size, the image soucre creates the thumbnail using the image’s full size, which in most cases is not desirable.

Include this key in the options dictionary you pass to the function [`CGImageSourceCreateThumbnailAtIndex(_:_:_:)`](/documentation/ImageIO/CGImageSourceCreateThumbnailAtIndex(_:_:_:)).

---

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)