> ## Documentation Index
> Fetch the complete documentation index at: https://studio.bjanczak.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Studio Media Entry

> Display authorized Studio media in a Filament record detail.

Use `StudioMediaEntry` in a Filament infolist to display a Studio reference saved by a
[picker](https://studio.bjanczak.com/filament-media-picker.md) or [upload field](https://studio.bjanczak.com/filament-studio-file-upload.md).
The state can be a single pinned reference or an array. Resolve the workspace
from the authorized host record.

## Square preview

```php theme={null}
use App\Models\Campaign;
use UseFlex\MediaStudio\Integrations\Filament\StudioMediaEntry;

StudioMediaEntry::make('cover')
    ->label('Campaign cover')
    ->studio(fn (Campaign $record): string => $record->studio_workspace_id)
    ->square()
    ->imageSize(56)
    ->openStudioMedia()
    ->placeholder('No cover available');
```

## Circular gallery previews

```php theme={null}
StudioMediaEntry::make('gallery')
    ->label('Selected assets')
    ->studio($workspaceId)
    ->circular()
    ->imageSize(36)
    ->stacked()
    ->limit(4)
    ->limitedRemainingText()
    ->placeholder('No media');
```

| Option | Behavior |
| - | - |
| `studio(string or Closure)` | Use the workspace that owns the pinned references. |
| `openStudioMedia(bool $newTab = true)` | Link to the authorized version URL. Omit it for a display-only preview. |
| `square()`, `circular()`, `imageSize()` | Use Filament's native shape and dimensions. |
| `stacked()`, `limit()`, `limitedRemainingText()` | Configure several references in one field. |
| `placeholder()`, `alt()` | Customize empty state and alt text. Studio falls back to stored alt text and then the file name. |

Previews use Studio's default thumbnail rendition and fall back to a document
icon when a readable file has no thumbnail. A deleted or unauthorized reference
does not resolve to a preview URL. The component reads media in the current
panel's authentication context. Even if the host record is visible, the asset's
own policies still apply. Configure the Studio thumbnail role for these display
components. `studioThumbnailPreset()` is for pickers and upload fields.

## Register the entry on a record view

```php theme={null}
use Filament\Schemas\Schema;

public static function infolist(Schema $schema): Schema
{
    return $schema->components([
        StudioMediaEntry::make('gallery')
            ->studio(fn (Campaign $record): string => $record->studio_workspace_id)
            ->square()
            ->imageSize(72)
            ->limit(6),
    ]);
}
```

Use an array cast for galleries. The entry batches the visible references for
that record. Use [Studio Media Column](https://studio.bjanczak.com/filament-media-column.md) in tables.


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