artisanpack-ui/media-library

Media library package for ArtisanPack UI

1.0.0-beta1 2025-11-03 19:51 UTC

This package is auto-updated.

Last update: 2025-11-03 20:03:32 UTC


README

Tests PHP Version Laravel Version

A comprehensive media management package for Laravel applications with support for image processing, folder organization, tagging, and modern image format conversion (WebP/AVIF).

Features

  • ๐Ÿ“ Hierarchical Folder Organization - Organize media into nested folders
  • ๐Ÿท๏ธ Tag Management - Tag media items for easy categorization
  • ๐Ÿ–ผ๏ธ Image Processing - Automatic thumbnail generation in multiple sizes
  • ๐Ÿš€ Modern Image Formats - Automatic conversion to WebP and AVIF
  • ๐Ÿ“ฆ Storage Abstraction - Support for multiple storage backends via Laravel's filesystem
  • ๐ŸŽฌ Video Support - Video thumbnail extraction using FFmpeg (optional)
  • ๐Ÿ” Advanced Search & Filtering - Search by name, filter by type, folder, or tag
  • ๐ŸŽฏ Drag & Drop Upload - Modern upload interface with progress tracking
  • ๐Ÿ–ฑ๏ธ Media Modal Component - Single/multi-select modal for choosing media with context support
  • ๐Ÿ” Permission-based Access Control - Granular capability-based permissions
  • ๐ŸŽจ Publishable Views - Customize all Blade views to match your design
  • ๐Ÿงช Comprehensive Test Coverage - Over 100 tests with 90%+ coverage

Requirements

  • PHP 8.2 or higher
  • Laravel 12.0 or higher
  • Intervention Image 3.0 for image processing
  • FFmpeg (optional, for video thumbnail extraction)

Installation

Install via Composer:

composer require artisanpack-ui/media-library

Quick Start

// Upload media
$media = apUploadMedia($file, [
    'title' => 'My Image',
    'alt_text' => 'Alt text for accessibility',
    'folder_id' => 1,
]);

// Get media URL
$url = apGetMediaUrl($mediaId, 'thumbnail');

// Display image
$media = apGetMedia($mediaId);
echo $media->displayImage('large', ['class' => 'img-fluid']);

Documentation

๐Ÿ“š Complete Documentation

Testing

Run the test suite:

composer test

Contributing

Contributions are welcome! Please ensure all tests pass and code follows ArtisanPack UI Code Standards.

Security

If you discover a security vulnerability, please send an email to security@artisanpack.com.

Credits

  • Jacob Martella
  • Intervention Image for image processing
  • PHP-FFMpeg for video processing

License

This package is proprietary software developed by ArtisanPack UI.