<!--
{
  "availability" : [
    "macOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSWorkspace/DesktopImageOptionKey",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:@T@NSWorkspaceDesktopImageOptionKey"
  },
  "title" : "NSWorkspace.DesktopImageOptionKey"
}
-->

# NSWorkspace.DesktopImageOptionKey

Keys that indicate how to display a new desktop image.

```
struct DesktopImageOptionKey
```

## Discussion

Specify the following keys when calling the [`setDesktopImageURL(_:for:options:)`](/documentation/AppKit/NSWorkspace/setDesktopImageURL(_:for:options:)) method.

## Topics

### Option Keys

[`NSWorkspaceDesktopImageScalingKey`](/documentation/AppKit/NSWorkspace/DesktopImageOptionKey/imageScaling)

A key that contains the behavior to use when scaling the image.

[`NSWorkspaceDesktopImageAllowClippingKey`](/documentation/AppKit/NSWorkspace/DesktopImageOptionKey/allowClipping)

A key that contains the behavior to use when clipping the image.

[`NSWorkspaceDesktopImageFillColorKey`](/documentation/AppKit/NSWorkspace/DesktopImageOptionKey/fillColor)

A key that contains the behavior to use when filling the empty space around the image.

### Initializers

[`init(rawValue:)`](/documentation/AppKit/NSWorkspace/DesktopImageOptionKey/init(rawValue:))

Initializes an option key using the specified raw value.

## Relationships

### Conforms To

[`SendableMetatype`](/documentation/Swift/SendableMetatype)

[`Sendable`](/documentation/Swift/Sendable)

[`Equatable`](/documentation/Swift/Equatable)

[`Hashable`](/documentation/Swift/Hashable)

[`RawRepresentable`](/documentation/Swift/RawRepresentable)

---

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)