---
title: "desktopImageURL(for:)"
framework: appkit
role: symbol
role_heading: Instance Method
path: "appkit/nsworkspace/desktopimageurl(for:)"
---

# desktopImageURL(for:)

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

## Declaration

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

## Parameters

- `screen`: The screen for which to get the desktop image.

## Return Value

Return Value The desktop image.

## Discussion

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

## See Also

### Managing the Desktop Image

- [setDesktopImageURL(_:for:options:)](appkit/nsworkspace/setdesktopimageurl(_:for:options:).md)
- [desktopImageOptions(for:)](appkit/nsworkspace/desktopimageoptions(for:).md)
- [NSWorkspace.DesktopImageOptionKey](appkit/nsworkspace/desktopimageoptionkey.md)
