> ## Documentation Index
> Fetch the complete documentation index at: https://filament-34a8cf01.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Image column

> [!WARNING]
>
> You are currently viewing the documentation for Filament 2.x, which is a previous version of Filament.
>
> Looking for the current stable version? Visit the [5.x documentation](https://filament-34a8cf01.mintlify.site/5.x/tables/columns/image.md).

Images can be easily displayed within your table:

```php theme={"theme":"gruvbox-dark-hard"}
use Filament\Tables\Columns\ImageColumn;

ImageColumn::make('header_image')
```

The column in the database must contain the path to the image, relative to the root directory of its storage disk.

## Managing the image disk

By default, the `public` disk will be used to retrieve images. You may pass a custom disk name to the `disk()` method:

```php theme={"theme":"gruvbox-dark-hard"}
use Filament\Tables\Columns\ImageColumn;

ImageColumn::make('header_image')->disk('s3')
```

## Private images

Filament can generate temporary URLs to render private images, you may set the `visibility()` to `private`:

```php theme={"theme":"gruvbox-dark-hard"}
use Filament\Tables\Columns\ImageColumn;

ImageColumn::make('header_image')->visibility('private')
```

## Square image

You may display the image using a 1:1 aspect ratio:

```php theme={"theme":"gruvbox-dark-hard"}
use Filament\Tables\Columns\ImageColumn;

ImageColumn::make('author.avatar')->square()
```

## Circular image

You may make the image fully rounded, which is useful for rendering avatars:

```php theme={"theme":"gruvbox-dark-hard"}
use Filament\Tables\Columns\ImageColumn;

ImageColumn::make('author.avatar')->circular()
```

## Customizing the size

You may customize the image size by passing a `width()` and `height()`, or both with `size()`:

```php theme={"theme":"gruvbox-dark-hard"}
use Filament\Tables\Columns\ImageColumn;

ImageColumn::make('header_image')->width(200)

ImageColumn::make('header_image')->height(50)

ImageColumn::make('author.avatar')->size(40)
```

## Adding a default image URL

You can display a placeholder image if one doesn't exist yet, by passing a URL to the `defaultImageUrl()` method:

```php theme={"theme":"gruvbox-dark-hard"}
use Filament\Tables\Columns\ImageColumn;

ImageColumn::make('avatar')
    ->defaultImageUrl(url('/images/placeholder.png'))
```

## Custom attributes

You may customize the extra HTML attributes of the image using `extraImgAttributes()`:

```php theme={"theme":"gruvbox-dark-hard"}
use Filament\Tables\Columns\ImageColumn;

ImageColumn::make('logo')
    ->extraImgAttributes(['title' => 'Company logo']),
```

[Edit this page on GitHub](https://github.com/filamentphp/filament/edit/2.x/packages/tables/docs/03-columns/04-image.md)

## Sponsored by

[Your logo here](https://github.com/sponsors/danharrin)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.