Download the PHP package georgemosesgroup/filament-media-library without Composer

On this page you can find all versions of the php package georgemosesgroup/filament-media-library. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package filament-media-library

Filament Media Library

A powerful media library package for Filament with MediaPicker form component, drag & drop uploads, and full integration with FileManager.

Requirements

Package Version
PHP 8.1+
Laravel 10.x, 11.x, 12.x
Filament 3.x, 4.x, 5.x

Features

Installation

Quick Install (Recommended)

Run the install command to automatically configure everything:

This will:

Then rebuild your theme:

Manual Installation

1. Register Plugin

Add the plugin to your Filament panel in AdminPanelProvider.php:

This automatically adds the Media Library page to your navigation.

2. Publish Config (Optional)

3. Run Migrations

4. Publish Assets

The package includes its own CSS for hover effects and animations. Publish the assets:

Note: This step is required after installation or updating the package. The CSS is automatically registered with Filament's asset system.

5. Configure Custom Theme (Optional - for Media Library Page)

If you're using the Media Library page (not just MediaPicker), add the package views to your Filament theme CSS (resources/css/filament/admin/theme.css):

Then rebuild your theme:

Plugin Options

Customize the Media Library page:

Disable the page (use only MediaPicker component):

Configuration

Config file: config/filament-media-library.php

Key Settings

Cloud Storage (S3 / DigitalOcean Spaces)

The package fully supports S3-compatible cloud storage including AWS S3 and DigitalOcean Spaces.

1. Configure Filesystem Disk

Add to config/filesystems.php:

2. Environment Variables

For DigitalOcean Spaces:

For AWS S3:

3. Set Media Library Disk

Update your .env:

Features

Usage

Basic Usage (Browse Mode - Default)

By default, MediaPicker shows a "Browse Library" button to select from existing files:

Upload Mode

Enable drag & drop upload with allowUpload():

Model Setup

Minimum required:

Migration:

Auto Directory Structure

Automatically organize uploads into folders based on resource:

Available placeholders:

Placeholder Description Example
{resource} Resource name Products
{record_id} Record ID 123
{field} Field name cover_image_id
{date} Current date 2026-01-28
{year} Current year 2026
{month} Current month 01
{tenant_id} Tenant ID 1

Example folder structure:

Component Options

File Type Filters

Selection Mode

Modal Customization

Upload Settings

Visibility & State

Gallery Layout (Grid Mode)

Display multiple files in a customizable grid layout:

Grid Mode Features:

Interactive Media Players

In grid mode, media files have built-in players:

Video:

Audio:

How It Works

Two Modes

  1. Browse Mode (default) - Click "Browse Library" button

    • Opens modal with full file browser
    • Navigate folders, search files
    • Select existing files from library
  2. Upload Mode - Enable with ->allowUpload()
    • Shows drag & drop zone
    • Files upload immediately
    • Stored in configured directory
    • ID saved to form field

Data Storage

Single file: Stores integer ID

Multiple files: Stores JSON array of IDs

Optional: Helper Methods

Add these to your model for convenient access:

API Usage (Frontend)

Get file data for API responses:

Multi-tenancy

The package automatically handles tenant isolation:

  1. All files are scoped to current tenant
  2. Folder structure is tenant-specific
  3. Users can only see their tenant's files

Tenant is resolved from (in order):

  1. Container-bound tenant
  2. Filament Filament::getTenant()
  3. Authenticated user's tenant_id
  4. Session filament_tenant_id

Synchronization with FileManager

This package uses the same database tables as FileManager:

Files uploaded via MediaPicker appear in FileManager and vice versa.

Artisan Commands

Install Command

Migrate Storage Command

Migrate files between storage disks (e.g., local to cloud):

Thumbnails

The package generates two layers of thumbnails out of the box:

  1. Admin preview — a single 300×300 thumbnail stored in the thumbnail_path column on media_items and used in the Filament admin grid. Generated synchronously on upload.

  2. Responsive thumbnails — a configurable set of widths stored under {thumbs_path}/{media_id}/{size}/{filename}.{format}. Generated asynchronously by GenerateThumbnailsJob, intended for the front-end. Driver is selected automatically (Imagick → GD → noop).

Configuration

API on MediaItem

getThumbnailUrl() (legacy admin preview) and the thumbnail_path column continue to work as before.

Driver Selection

Driver When used
imagick extension_loaded('imagick') and format supported
gd imagick missing, gd available
noop both missing — logs a warning, returns no thumbs

Sizes larger than the source width are skipped automatically. SVG and non-image items are also skipped.

Regenerating Thumbnails

Migration from Custom Observer

If your application previously implemented its own ThumbnailGenerator + MediaItemObserver to produce responsive thumbs, you can drop them after upgrading to v1.3 — the package now handles this end to end. Update consumer code that reads paths to use $item->thumbUrl($size) instead of building paths by hand.

Updating the Package

After updating via composer, run:

UI/UX Features

Drag & Drop Upload

When allowUpload() is enabled:

Card Hover Effects

Upload Progress

Responsive Design

All components are fully responsive and work on mobile devices.

Troubleshooting

Upload returns 500 error

Check Laravel log for details:

Common issues:

Files not showing

  1. Clear cache: php artisan cache:clear
  2. Check tenant scope is correct
  3. Verify files exist in database

Modal not opening

  1. Check browser console for JS errors
  2. Ensure Alpine.js is loaded
  3. Clear Filament cache: php artisan filament:cache-components

License

MIT License - see LICENSE file for details.


All versions of filament-media-library with dependencies

PHP Build Version
Package Version
Requires php Version ^8.1|^8.2|^8.3|^8.4
filament/filament Version ^3.0|^4.0|^5.0
illuminate/contracts Version ^10.0|^11.0|^12.0
league/flysystem-aws-s3-v3 Version ^3.0
spatie/laravel-package-tools Version ^1.14
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package georgemosesgroup/filament-media-library contains the following files

Loading the files please wait ...