<!--
{
  "availability" : [
    "macOS: 10.6.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSWorkspace/desktopImageURL(for:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:objc(cs)NSWorkspace(im)desktopImageURLForScreen:"
  },
  "title" : "desktopImageURL(for:)"
}
-->

# desktopImageURL(for:)

Returns the URL for the desktop image for the given screen.

```
func desktopImageURL(for screen: NSScreen) -> URL?
```

## Parameters

`screen`

The screen for which to get the desktop image.

## Return Value

The desktop image.

## Discussion

You must call this method from your app’s main thread.

---

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)