Download the PHP package rayzenai/file-manager without Composer

On this page you can find all versions of the php package rayzenai/file-manager. 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 file-manager

Latest Version on Packagist Total Downloads

Laravel File Manager for Filament

A comprehensive Laravel package for Filament v4 that provides advanced file management with automatic image resizing, compression, media metadata tracking, and seamless S3 integration. Built for high-performance applications handling large volumes of media content.

This package is developed and maintained by Kiran Timsina and RayzenTech.

Key Features

Core Features

Advanced Processing

Developer Experience

About the Developers

Kiran Timsina is a full-stack developer specializing in Laravel and Filament applications. Connect on GitHub.

RayzenTech is a tech startup based in Nepal focused on creating smart business solutions. We specialize in automating complex processes and making them simple, from business automation to robotic process automation. Learn more at RayzenTech.


Requirements

Installation

  1. Install via Composer:

  2. Publish the configuration:

  3. Publish and run migrations (for media metadata):

  4. Configure your .env file:

  5. Register the plugin in your Filament panel provider:

Configuration

The configuration file config/file-manager.php allows you to customize:

Usage in Models

Using the HasImages Trait

The HasImages trait automatically handles image resizing when images are uploaded or updated:

Key Features:

Usage in Filament Resources

SEO Title Support

The package includes built-in SEO title functionality for better search engine optimization of media files:

Configuration:

Control which models receive SEO titles in config/file-manager.php:

MediaUpload Component

The MediaUpload component extends Filament's FileUpload with automatic compression and metadata tracking:

Available Methods:

Important Notes:

Features:

Background Removal

The removeBg() method enables AI-powered background removal for images. This feature requires external API configuration (specifically the background removal API endpoint) and is not available with the GD library method.

Compression Drivers

You can specify which compression driver to use:

The package supports two external APIs:

Important: When using Toggle fields for background removal control, use dehydrated(false) or handle the field in mutateFormDataBeforeCreate() and mutateFormDataBeforeSave() to prevent database errors:

MediaModalColumn and MediaUrlColumn

Display images in tables with different interaction styles:

MediaModalColumn

Display images with modal preview and optional editing capabilities:

MediaUrlColumn

Display images that link to a dedicated media page:

Common Methods (both components):

MediaModalColumn specific methods:

MediaUrlColumn specific methods:

Features:

Relationship Support (v4.3+):

The relationship parameter allows you to display and manage images from related models:

This will:

Default Sizes

You can configure default sizes for MediaColumn components in your configuration:

Or via environment variables:

Available size configurations:

Individual columns can still override these defaults (limited to thumbnail size only):

S3Image Column

Display images in tables with modal preview:

Media Metadata Management

The package includes a powerful Filament resource for comprehensive media management.

Dashboard Features

Navigation & Monitoring

File Management

Advanced Filtering

Individual File Actions

  1. Open in Panel: Navigate directly to the parent resource
  2. Resize: Generate all configured size variations
  3. Compress: Apply custom compression settings
  4. Rename: Update file names in database
  5. Delete Resized: Remove all size variations

Bulk Operations

Bulk Compress

Bulk Resize

Bulk Delete Resized

Image Processor Page

The MediaMetadata resource includes a dedicated Image Processor page - a powerful tool for testing and optimizing your image processing pipeline.

Features:

Upload & Process

Processing Options

Compression Methods

Results & Analytics

Use Cases:

  1. Test compression settings before applying to production
  2. Optimize images for specific use cases
  3. Validate API configuration and performance
  4. Compare processing methods (GD vs API)
  5. Generate samples for documentation

Service Methods

Using the FileManager Facade

Image Compression Service

Compression Methods:

Queue Jobs

The package uses queued jobs for better performance:

Available Jobs:

Artisan Commands

The package provides several powerful Artisan commands for managing your media files and metadata:

Command Purpose Key Features
file-manager:manage-sizes Add/remove image sizes for all media Config checking, batch processing, dry run
file-manager:refresh-all Queue refresh jobs for all media Metadata sync, dimension updates, batch jobs
file-manager:populate-seo-titles Generate SEO titles for media files Dry run, model filtering, chunked processing
file-manager:update-seo-titles Update SEO titles when models change Model-specific updates, automatic tracking
file-manager:populate-metadata Create metadata for existing images Supports all models, progress tracking
file-manager:remove-duplicates Remove duplicate metadata records Safe cleanup, dry run preview
file-manager:update-cache-headers Add cache headers to existing S3 images Directory-specific, progress tracking

Manage Image Sizes

Add or remove image sizes for all media files in the media_metadata table. This command is useful when you need to add a new size to your configuration or clean up unused sizes.

Adding a New Size

Removing an Existing Size

Key Features

Important Notes

Example Output

Blocked when size not in config:

Success after adding to config:


Refresh All Media

Queue refresh jobs to update metadata for all media files. This command checks file metadata, dimensions, and synchronizes database records with actual file states in S3 storage.

What It Checks

Key Features

Example Output

GUI Alternative

You can also use the "Refresh All (Queued)" bulk action in the MediaMetadata admin panel to refresh selected records through the UI.


Populate SEO Titles

Generate SEO-optimized titles for existing media files based on their parent model data:

Features:

Update SEO Titles

Update SEO titles when parent model data changes:

Automatic Updates with HasImages Trait

The HasImages trait now includes automatic SEO title updates. Simply define which field to use for SEO titles in your model:

The HasImages trait now provides:

How SEO Titles Work:

Important Notes:

Example for different models:

Populate Media Metadata

If you have existing images in your database before installing this package, you can populate their metadata:

Improvements in the latest version:

This command will:

  1. Scan configured models that use the HasImages trait
  2. Process records in batches to avoid memory issues
  3. Create MediaMetadata records for existing images
  4. Dispatch jobs to handle large datasets efficiently
  5. Extract file information including size, mime type, and dimensions

Remove Duplicate Media Metadata

Clean up duplicate media metadata records from your database:

What it does:

Features:

Example output:

This command is useful when:

Update Cache Headers for Existing Images

Retroactively add cache control headers to existing images in S3:

Features:

How it works:

This command is essential if you have images uploaded before cache headers were implemented, ensuring all your images benefit from optimal browser and CDN caching.

💡 Tip: Verifying Cache Headers

To check if cache headers are properly set on your images, use curl:

Helper Functions

Advanced Usage

Custom Image Sizes

Define custom sizes in your config:

Disabling Automatic Resizing

To completely disable automatic image resizing, set the image_sizes config to an empty array:

This is useful when:

Exclude Certain Fields from Resizing

Videos and certain file types are automatically excluded from resizing.

Handling Nested Arrays

For complex data structures like checkout items:

Troubleshooting

Images not resizing

Duplicate resize jobs

WebP conversion failing

Performance Tips

  1. Use queues for image processing to avoid blocking requests
  2. Enable compression for automatic file size optimization
  3. Configure CDN for faster content delivery
  4. Set appropriate thresholds to avoid compressing small files
  5. Use WebP format for 25-35% smaller file sizes
  6. Configure cache headers for optimal browser and CDN caching:
    • Set max_age to 31536000 (1 year) for versioned/hashed filenames
    • Use public visibility for CDN caching
    • Enable immutable for static assets that never change

Cache Control Configuration

The package automatically adds cache headers to all uploaded images for optimal performance:

All images uploaded to S3 will automatically include these cache headers:

Changelog

Please see CHANGELOG for recent changes.

Contributing

Contributions are welcome! Please see CONTRIBUTING for details.

Security

If you discover any security issues, please email [email protected] instead of using the issue tracker.

Credits

License

The MIT License (MIT). Please see License File for more information.

Support

For support, please open an issue on GitHub.


All versions of file-manager with dependencies

PHP Build Version
Package Version
Requires php Version ^8.3
filament/filament Version ^4.0.0
illuminate/contracts Version ^10.0||^11.0||^12.0
illuminate/support Version ^10.0||^11.0|^12.0
intervention/image Version ^3.9
league/flysystem-aws-s3-v3 Version ^3.29
php-ffmpeg/php-ffmpeg Version ^1.2
spatie/laravel-package-tools Version ^1.16
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 rayzenai/file-manager contains the following files

Loading the files please wait ....