Skip to content

The library page ​

The Media library page is where people browse and manage files. The same browser also opens inside the picker field and on pages outside panels.

The library in list layout with name, type, size, dimensions and date columnsThe library in list layout with name, type, size, dimensions and date columns
List layout: one row per file, with type, size, dimensions and age.

Layout and tile size ​

The toolbar has a Grid and List switch. Grid shows thumbnails; list shows name, type, size, dimensions and age. A slider next to the switch changes the thumbnail size from 120 to 280 pixels in grid layout.

The chosen layout and tile size are remembered per browser. Set the defaults for everyone on the plugin:

php
use Hoceineel\FilamentMediaLibrary\Enums\BrowserLayout;
use Hoceineel\FilamentMediaLibrary\Enums\SortOrder;
use Hoceineel\FilamentMediaLibrary\FilamentMediaLibraryPlugin;

FilamentMediaLibraryPlugin::make()
    ->defaultLayout(BrowserLayout::List)
    ->defaultSort(SortOrder::NameAsc)
    ->tileSize(220)
    ->perPage(24);

The library loads perPage files at a time (48 by default) and loads more as you scroll, or when you press Load more.

Type in the search box, or press / to jump to it. The search matches, anywhere in the text:

  • the file's title,
  • its file name,
  • its alt text,
  • its caption,
  • the names of its tags.

It does not search descriptions or custom metadata. Searching looks across every folder, not just the open one, and the results header replaces the folder path. Opening a folder clears the search.

Type chips ​

The chips under the toolbar filter by Images, Videos, Audio, Documents, Archives and Other. Select several to show any of them. In a picker that only accepts images, only the matching chips appear. Clear filters resets search, chips and tags together.

Tags ​

The tag cloud in the sidebar lists up to 30 tags with the number of files in each. Click a tag to filter. Select several tags to show files that have at least one of them. See Organizing.

Sorting ​

The sort button offers Newest first, Oldest first, Name A-Z, Name Z-A, Largest first and Smallest first. The sort order is not remembered between visits; it starts from the plugin's defaultSort.

Selecting files ​

ActionResult
Click a fileSelects it and opens its details.
Shift + clickSelects the range from the last file you clicked.
Cmd/Ctrl + clickAdds or removes one file.
Click the check circle on a tileAdds or removes one file without a modifier key.
Cmd/Ctrl + ASelects every file currently loaded.
Click empty space, or press EscClears the selection.
Double-clickOpens the full-screen preview.

Select all covers the files that are loaded, so scroll or press Load more first if you need more.

Bulk actions ​

With two or more files selected, a bar floats over the bottom of the grid. Selecting through the check circle shows it for a single file too.

Three files selected with the floating bulk barThree files selected with the floating bulk bar
The bulk bar shows the count and one button per action.
ActionWhat it does
MoveMoves the files to a folder you choose. Needs the Folders feature.
TagAdds tags to every selected file. Existing tags stay. Needs Tags.
DownloadDownloads one file as is, or up to 500 files as a ZIP. Needs Download.
VisibilitySets the files to Shared or Only me. See Private files.
DeleteMoves the files to the trash after you confirm.

In the Trash view the bar offers Restore and Delete forever instead.

Drag to folders ​

Drag one or more selected files onto a folder tile, a folder in the sidebar, a breadcrumb, or All folders to move them. Drag folders the same way to nest them. Dragging files from your computer onto a folder uploads straight into that folder.

Smart views ​

The sidebar lists views above the folder tree:

ViewShows
All mediaEverything, by folder.
Recently addedFiles uploaded in the last 14 days.
FavoritesFiles you starred. Favorites are per user.
My uploadsFiles you uploaded.
UnusedFiles not attached anywhere. Safe to delete. Hidden in pickers.
TrashDeleted files, with restore.

Recently added, My uploads and Unused need the SmartViews feature. Favorites needs Favorites, Unused also needs Usage, and Trash needs Trash. Counts appear beside All media and Trash. See Features.

Empty states ​

An empty library shows an upload button, a New folder button and a tip about dragging and pasting. An empty folder, an empty smart view and an empty trash each explain what belongs there. A search or filter with no match offers Clear filters.

Picker mode and manage mode ​

The page runs in manage mode. The picker modal runs in pick mode, and it changes some behaviour:

  • Clicking a file selects it and does not open details. Double-click, or Enter, inserts it.
  • A footer shows the selection and an Insert button, with a limit such as 3 / 12 when the field has maxItems.
  • Bulk actions, the Unused view and folder menus are hidden.
  • Only the accepted file types are listed.

New uploads made in a picker are selected for you.

The picker modal open over a formThe picker modal open over a form
Pick mode: the same library in a modal, with an Insert footer.

Next: Uploading.

Commercial licence. One licence per production project. Terms · Privacy · Refunds