<!-- source-hash: 3405ab77a3bbd5f68b76564b38e7a642 -->
A client-side React component that renders an entity's avatar image with an automatic initials-based fallback when the image source is unavailable or fails to load.

## Key Components

### `EntityImageProps`
| Prop | Type | Description |
|------|------|-------------|
| `src` | `string \| null` | Image URL to display |
| `alt` | `string` | Alt text for the image and fallback aria-label |
| `fallbackText` | `string` | Overrides `alt` as the initials source |
| `className` | `string` | Additional CSS classes |

### `EntityImage`
Main export. Renders an `<img>` tag when a valid `src` is provided and loads successfully. Falls back to a styled `<div>` showing two-letter initials (via `getFirstLastInitials`) or `?` when no initials can be derived.

**Fallback triggers:**
- `src` is `null` or `undefined`
- Image fires an `onError` event (broken URL, network failure, etc.)
- Image error state resets automatically when `src` changes

## Usage Example

```typescript
import { EntityImage } from './entity-image'

// Renders the avatar image
<EntityImage
  src="https://cdn.example.com/avatars/acme.png"
  alt="Acme Corp"
/>

// Renders initials fallback "AC" if image fails
<EntityImage
  src={null}
  alt="Acme Corp"
  className="my-custom-class"
/>

// Override initials source independently from alt text
<EntityImage
  src="https://cdn.example.com/avatars/john.png"
  alt="User avatar"
  fallbackText="John Doe"
/>
```