<!--
{
  "availability" : [
    "tvOS: 9.0.0 - 18.0.0"
  ],
  "documentType" : "symbol",
  "framework" : "TVMLKit",
  "identifier" : "/documentation/TVMLKit/TVInterfaceCreating/resourceImage(name:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "TVMLKit"
    ],
    "preciseIdentifier" : "c:objc(pl)TVInterfaceCreating(im)imageForResource:"
  },
  "title" : "resourceImage(name:)"
}
-->

# resourceImage(name:)

Returns the image for the given resource

```
optional func resourceImage(name resourceName: String) -> UIImage?
```

## Parameters

`resourceName`

A string that contains the name of the resource.

## Return Value

The <doc://com.apple.documentation/documentation/UIKit/UIImage> associated with the resource name. Returns `nil` if no image matches the resource name or if the event is not handled.

## Discussion

The `resourceName` parameter comes from a resource URL specified in certain elements. For example, `<``badge src="resource://developer-resource">` contains the resource name, `developer-resource`.

---

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)