mlbrgn/laravel-medialibrary-extensions

Extensions designed for use with the Media Library package by Spatie. Adds a single image uploader, multiple image uploader and a modal with carousel

Maintainers

Package info

github.com/MLBRGN/laravel-medialibrary-extensions

pkg:composer/mlbrgn/laravel-medialibrary-extensions

Transparency log

Statistics

Installs: 654

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 6

2.3.22 2026-07-29 21:33 UTC

README

This package adds functionality to the Media Library package by Spatie:

  • Providing a view to upload multiple media
  • Providing a view to upload single media

Requirements

This package assumes that spatie/laravel-medialibrary is installed and its default migration has been run to create the media table.

Installation

  1. Install the package using:
  composer require mlbrgn/laravel-medialibrary-extensions
  1. Run install command
  php artisan medialibrary-extensions:install

You can configure the path to the translations the Image Editor, provided by this package, uses by adding the following to your app.js (or similar).

ImageEditor.translationsPath = '/js/vendor/image-editor/lang';

The install command will publish the needed assets, config, translation, views, and a policy.

Manual install (without using the install command)

You can also manually install by installing the @mlbrgn/laravel-medialibrary-extensions package

  npm install @mlbrgn/laravel-medialibrary-extensions

And publish the required assets

php artisan vendor:publish --provider="Mlbrgn\MediaLibraryExtensions\Providers\MediaLibraryExtensionsServiceProvider" --tag="medialibrary-extensions-assets"

Themes

The provided themes are:

  • plain (vanilla css and js)
  • bootstrap-5

Publishing

Several assets can be published:

  • config
  • views
  • assets
  • policy
  • translations

to publish all package assets:

php artisan vendor:publish --provider="Mlbrgn\MediaLibraryExtensions\Providers\MediaLibraryExtensionsServiceProvider"

to publish a single tag (group of assets):

php artisan vendor:publish --tag=medialibrary-extensions-config
php artisan vendor:publish --tag=medialibrary-extensions-views
php artisan vendor:publish --tag=medialibrary-extensions-assets
php artisan vendor:publish --tag=medialibrary-extensions-images
php artisan vendor:publish --tag=medialibrary-extensions-translations

Icons

For icons to work, you will have to install a Blade UI Kit package.

The package is configured to use the Blade Bootstrap Icons by default. To display them properly install

   composer require davidhsianturi/blade-bootstrap-icons

You can override the icons in the published configuration file of this package and install another Blade UIKit/Blade-icons package

Testing

This package uses Pest PHP for testing. For more information on how to write tests for this package, see the TESTING.md guide.

If snapshot output changes intentionally, update snapshots with:

composer test -- --update-snapshots