title: Setting mask on bar button item with profile picture
body: <p>I've been struggling for a while with setting up a circular profile picture as a bar button item. The picture comes from a URL using SDWebImage. When I run the app the item appears as a square and all the other right bar button items shift left. Also ran into the same issues when trying to set the object as a UIButton. Does anybody know how I could set a circular mask on the object, and/or why the other bar button items shift left?</p>
  <pre><code>    @IBOutlet weak var myAvatarButton: UIBarButtonItem! {
      didSet {
          guard let userImageURL = CurrentUser.shared.imageURL else {
              return
          }
          let avatarImage = UIImageView()
          avatarImage.sd_setImage(with: userImageURL, placeholderImage: #imageLiteral(resourceName: &quot;noProfilePhoto&quot;), options: [.refreshCached, .retryFailed, .highPriority]) { [weak self] (image, error, cacheType, imageURL) in
              self?.myAvatarButton.image = image?.withRenderingMode(UIImage.RenderingMode.alwaysOriginal)
          }
      }
  }
  </code></pre>
  <p><a href="https://i.stack.imgur.com/s5uKb.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/s5uKb.png" alt="Simulator Screenshot" /></a>
  <a href="https://i.stack.imgur.com/HLGDp.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/HLGDp.png" alt="Storyboard" /></a></p>