<!--
{
  "availability" : [
    "macOS: 10.12.4 -"
  ],
  "documentType" : "symbol",
  "framework" : "SafariServices",
  "identifier" : "/documentation/SafariServices/SFSafariToolbarItem/setImage(_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Safari Services"
    ],
    "preciseIdentifier" : "c:objc(cs)SFSafariToolbarItem(im)setImage:"
  },
  "title" : "setImage(_:)"
}
-->

# setImage(_:)

Sets the image displayed in the toolbar button.

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

## Parameters

`image`

The image to display in the toolbar button.

## Discussion

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

---

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)