---
title: "init(_:bundle:)"
framework: swiftui
role: symbol
role_heading: Initializer
path: "swiftui/image/init(_:bundle:)"
---

# init(_:bundle:)

Creates a labeled image that you can use as content for controls.

## Declaration

```swift
init(_ name: String, bundle: Bundle? = nil)
```

## Parameters

- `name`: The name of the image resource to lookup, as well as the localization key with which to label the image.
- `bundle`: The bundle to search for the image resource and localization content. If nil, SwiftUI uses the main Bundle. Defaults to nil.

## See Also

### Creating an image

- [init(_:variableValue:bundle:)](swiftui/image/init(_:variablevalue:bundle:).md)
- [init(_:)](swiftui/image/init(_:).md)
