<!--
{
  "availability" : [
    "tvOS: 11.0.0 - 13.0.0"
  ],
  "documentType" : "symbol",
  "framework" : "TVServices",
  "identifier" : "/documentation/TVServices/TVContentItem/setImageURL(_:forTraits:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "TV Services"
    ],
    "preciseIdentifier" : "c:objc(cs)TVContentItem(im)setImageURL:forTraits:"
  },
  "title" : "setImageURL(_:forTraits:)"
}
-->

# setImageURL(_:forTraits:)

```
func setImageURL(_ aURL: URL?, forTraits traits: TVContentItemImageTrait)
```

## Parameters

`aURL`

The URL corresponding to the image location. This parameter can be an absolute path on the local device or an HTTP path. Specify `nil` to remove the image associated with the given traits.

`traits`

The traits to associate with the image. For example, you might specify that the image applies only to dark interfaces.

## Discussion

The preferred file format for this image is a layered image file that provides the proper 3d effects. For more information, see [App Programming Guide for tvOS](https://developer.apple.com/library/archive/documentation/General/Conceptual/AppleTV_PG/index.html#//apple_ref/doc/uid/TP40015241).

---

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)