# Empty: Image

> Give images explicit dimensions so the layout doesn’t shift while they load.

Example: https://hextaui.com/docs/empty/examples/image
Component docs: https://hextaui.com/docs/empty.md

## Add this example

```bash
npx shadcn@latest add https://hextaui.com/r/empty-image.json
```

This adds `components/examples/empty/image.tsx` with the Empty component and the HextaUI theme tokens.

## Source

```tsx title="components/examples/empty/image.tsx"
import { Button } from "@/components/ui/button"
import {
  Empty,
  EmptyContent,
  EmptyDescription,
  EmptyHeader,
  EmptyMedia,
  EmptyTitle,
} from "@/components/ui/empty"

export function EmptyImage() {
  return (
    <Empty>
      <EmptyHeader>
        <EmptyMedia>
          <img
            src="/preview/landscape.svg"
            alt=""
            width={160}
            height={100}
            className="h-24 w-40 rounded-lg object-cover"
          />
        </EmptyMedia>
        <EmptyTitle>No photos in this album</EmptyTitle>
        <EmptyDescription>
          Drop photos here or add them from your library.
        </EmptyDescription>
      </EmptyHeader>
      <EmptyContent>
        <Button variant="outline" size="sm">
          Add photos
        </Button>
      </EmptyContent>
    </Empty>
  )
}
```

## More Empty examples

- [Entrance](https://hextaui.com/docs/empty/examples/transition.md)
- [Outline](https://hextaui.com/docs/empty/examples/outline.md)
- [Muted](https://hextaui.com/docs/empty/examples/muted.md)
- [Small](https://hextaui.com/docs/empty/examples/small.md)
- [Avatar](https://hextaui.com/docs/empty/examples/avatar.md)
- [Avatar group](https://hextaui.com/docs/empty/examples/avatar-group.md)
- [No search results](https://hextaui.com/docs/empty/examples/search-results.md)
- [In a card](https://hextaui.com/docs/empty/examples/in-card.md)
- [In a table](https://hextaui.com/docs/empty/examples/in-table.md)
- [In a popover](https://hextaui.com/docs/empty/examples/in-popover.md)
- [In a command list](https://hextaui.com/docs/empty/examples/in-command.md)
- [Heading level](https://hextaui.com/docs/empty/examples/heading.md)
- [Long content](https://hextaui.com/docs/empty/examples/long-content.md)
- [Right to left](https://hextaui.com/docs/empty/examples/rtl.md)
