---
title: "init(adaptiveImageGlyph:attributes:)"
framework: foundation
role: symbol
role_heading: Initializer
path: "foundation/nsattributedstring/init(adaptiveimageglyph:attributes:)"
---

# init(adaptiveImageGlyph:attributes:)

Creates an attributed string with an adaptive image glyph and applies the specified attributes to it.

## Declaration

```swift
convenience init(adaptiveImageGlyph: NSAdaptiveImageGlyph, attributes: [NSAttributedString.Key : Any] = [:])
```

## Parameters

- `adaptiveImageGlyph`: The adaptive image glyph to place in the string. Typically, you get this type from the text input system.
- `attributes`: The attributes to apply to the adaptive image glyph. Specify an empty dictionary to create the string without any extra attributes.

## Return Value

Return Value An attributed string containing the adaptive image glyph.

## See Also

### Creating a string with an attachment

- [init(attachment:)](foundation/nsattributedstring/init(attachment:).md)
- [init(attachment:attributes:)](foundation/nsattributedstring/init(attachment:attributes:).md)
