Lekki pipeline obrazów i wideo dla Laravela (shared hosting ready): warianty, AVIF/WebP, <picture>, eager/lazy generacja, narzędzia CLI.
dominservice/laravel-media-kit is a Laravel package for lekki pipeline obrazów i wideo dla laravela (shared hosting ready): warianty, avif/webp, <picture>, eager/lazy generacja, narzędzia cli..
It currently has 0 GitHub stars and 12 downloads on Packagist (latest version 1.2.4).
Install it with composer require dominservice/laravel-media-kit.
Discover more Laravel packages by dominservice
or browse all Laravel packages to compare alternatives.
Last updated
dominservice/laravel-media-kit is a reusable media layer for Laravel applications that need image and video processing, responsive variants and a shared admin media library.
It is designed to work well in two modes at once:
dominservice/laravel-cms and larger modular systems.composer require dominservice/laravel-media-kit
php artisan vendor:publish --provider="Dominservice\MediaKit\MediaKitServiceProvider" --tag=mediakit-config
php artisan vendor:publish --provider="Dominservice\MediaKit\MediaKitServiceProvider" --tag=mediakit-migrations
php artisan vendor:publish --provider="Dominservice\MediaKit\MediaKitServiceProvider" --tag=mediakit-views
php artisan migrate
use Dominservice\MediaKit\Traits\HasMedia;
use Dominservice\MediaKit\Traits\HasMediaKinds;
class Post extends Model
{
use HasMedia;
use HasMediaKinds;
}
$post->addMedia($request->file('cover'), 'featured');
$post->attachExistingMedia($mediaAsset, 'featured');
$post->attachExistingMedia($uuid, 'gallery', 'keep');
This is useful for shared media libraries, CMS block builders and projects where the same asset may be used in many places.
The package now includes an optional admin media library module.
It provides:
media_libraries table,'admin' => [
'enabled' => true,
'prefix' => 'admin/media',
'route_name_prefix' => 'admin.media.',
'middleware' => ['web', 'auth'],
'permissions' => [
'view' => 'media.view',
'upload' => 'media.upload',
'delete' => 'media.delete',
],
'layout' => [
'mode' => 'extends',
'view' => 'layouts.admin',
'section' => 'content',
'component' => 'admin-layout',
],
'library' => [
'view' => 'mediakit::admin.library.index',
'default_key' => 'global',
'default_name' => 'Main media library',
'default_collection' => 'library',
'per_page' => 18,
],
],
This keeps the route and controller logic inside the package while allowing the project to override only the Blade views.
dominservice/laravel-cms can use Media Kit as its media backend.
Recommended setup:
laravel-media-kit,laravel-cms,This gives you a reusable package architecture and avoids duplicating media logic per project.
Kinds let you define domain-aware media contracts such as avatar, gallery, video_avatar or video_poster.
'kinds' => [
'avatar' => [
'collection' => 'avatar',
'display' => 'lg',
'variants' => ['thumb', 'sm', 'md', 'lg'],
],
'video_avatar' => [
'collection' => 'video',
'renditions' => ['hd', 'sd', 'mobile'],
'poster_kind' => 'video_poster',
],
],
The package is prepared for reuse across projects.
php artisan vendor:publish --provider="Dominservice\MediaKit\MediaKitServiceProvider" --tag=mediakit-views
Recommended approach:
This is especially useful when pairing Media Kit with a custom CMS or admin template such as Metronic.
The package is intentionally configurable instead of hardcoded.
You can override:
This allows each project to adapt the package without forking the package logic.
MIT