---
title: "setImage(_:)"
framework: safariservices
role: symbol
role_heading: Instance Method
path: "safariservices/sfsafaritoolbaritem/setimage(_:)"
---

# setImage(_:)

Sets the image displayed in the toolbar button.

## Declaration

```swift
func setImage(_ image: NSImage?)
```

## Parameters

- `image`: The image to display in the toolbar button.

## Mentioned in

Adjusting settings for a toolbar item

## Discussion

Discussion Pass nil to use the image specified in the Info.plist file.

## See Also

### Controlling Toolbar Items

- [setEnabled(_:withBadgeText:)](safariservices/sfsafaritoolbaritem/setenabled(_:withbadgetext:).md)
- [setBadgeText(_:)](safariservices/sfsafaritoolbaritem/setbadgetext(_:).md)
- [setEnabled(_:)](safariservices/sfsafaritoolbaritem/setenabled(_:).md)
- [setLabel(_:)](safariservices/sfsafaritoolbaritem/setlabel(_:).md)
