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

# kCGImageSourceAllowableTypes

Option key for restricting which image formats can be decoded.

```
let kCGImageSourceAllowableTypes: CFString
```

## Discussion

The value is a <doc://com.apple.documentation/documentation/CoreFoundation/CFArray> containing <doc://com.apple.documentation/documentation/CoreFoundation/CFString> Uniform Type Identifiers (UTIs)
of allowed image formats. When specified, ImageIO will only decode images
whose format matches one of the entries in the allow list. If no matching reader
is found, decoding fails.

Unknown format identifiers are ignored.
If not specified, all supported ImageIO formats are allowed (default behavior).
If process-wide format restrictions were set via [`CGImageSourceSetAllowableTypes(_:)`](/documentation/ImageIO/CGImageSourceSetAllowableTypes(_:)),
only formats allowed by both mechanisms are permitted.

See also <doc://com.apple.documentation/documentation/UniformTypeIdentifiers/system-declared-uniform-type-identifiers>.

## Example

```swift
let allowedTypes = ["public.jpeg" as CFString, "public.png" as CFString]
let options = [
    kCGImageSourceAllowableTypes: allowedTypes
] as CFDictionary
```

---

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)