# useAvatar

> For the complete documentation index, see [llms.txt](https://ensforge.com/llms.txt).

Reads a name's avatar as an image URL, with NFT avatars resolved. Signature, options, result and examples for useAvatar in @ensforge/react.

Source: https://ensforge.com/docs/reference/react/use-avatar

<ApiMeta kind="Read hook" stability="stable" since="1.0.0" source="packages/react/src/hooks/named/reads.ts#L110" />

Reads a name's avatar as an image URL, with NFT avatars resolved. Preset of `useRead(Actions.record.getAvatar, …)`.

It wraps [`record.getAvatar`](/docs/reference/sdk/record/get-avatar): the same options, result and errors.

## Signature [#signature]

```ts
function useAvatar(options: Actions.record.getAvatar.Options | undefined, config?: ReadConfig): ReadResult<Actions.record.getAvatar.ReturnType, Actions.record.getAvatar.ErrorType>
```

## Examples [#examples]

```tsx title="Reading in a component"
import { useAvatar } from "@ensforge/react"

function View() {
  const { data: avatar } = useAvatar({ name: "nick.eth" })
  return <img src={avatar ?? undefined} />
}
```

## See also [#see-also]

- The [hook types](/docs/reference/react#types): `ReadResult`, `WriteResult` and `ReadConfig`.