---
title: "imageURL(for:)"
framework: tvservices
role: symbol
role_heading: Instance Method
path: "tvservices/tvtopshelfitem/imageurl(for:)"
---

# imageURL(for:)

Returns an image associated with the current item.

## Declaration

```swift
func imageURL(for traits: TVTopShelfItem.ImageTraits) -> URL?
```

## Parameters

- `traits`: The traits that describe the image.

## Return Value

Return Value The image associated with the specified traits; otherwise, nil if you did not previously assign an image with the specified traits.

## See Also

### Providing an Image for the Item

- [setImageURL(_:for:)](tvservices/tvtopshelfitem/setimageurl(_:for:).md)
- [TVTopShelfItem.ImageTraits](tvservices/tvtopshelfitem/imagetraits.md)
