Configuration Reference
All configuration lives in config/media-selector.php.
Below is an overview of the most relevant options for tailoring the selector to your project.
Storage & directories
disk— default filesystem disk used for uploads (public).directory— base directory relative to the disk root (media).max_upload_kb— upload size limit in kilobytes.
Use the trait helper getMediaUrls() or getMediaUrl() to resolve storage URLs regardless of the chosen disk.
Upload restrictions
allowed_extensions— array of extensions (e.g.['jpg', 'png', 'webp']).allowed_mimes— full mime types or wildcard groups (e.g.['image/*']).- Provide
:extensionsor:mimesattributes on the component to override per-instance limits.
Component behavior
multiple— allow multi-select.can_upload/can_delete— gate destructive actions.can_see_trash/can_restore_trash— expose soft-deleted media management.restrict_to_current_user— scope listings to the authenticated user’s uploads.
UI flavor
Switch between Tailwind (default) and Bootstrap markup:
'ui' => env('MEDIA_SELECTOR_UI', 'tailwind'),
Per component override:
<livewire:media-selector ui="bootstrap" />
Custom filtering
You can register an extra scope callback to modify the underlying query:
'extra_scope' => App\MediaSelector\Scopes\TeamScoped::class.'@apply',
Within the apply method, receive the query builder and the Livewire component instance to add constraints:
public function apply($query, $component)
{
$query->where('team_id', $component->teamId);
}