

Here you can set the default * value of that attribute. */ 'enable_vapor_uploads' => env ( 'ENABLE_MEDIA_LIBRARY_VAPOR_UPLOADS', false ), /* * When converting Media instances to response the media library will add * a `loading` attribute to the `img` tag. */ 'media_downloader' => Spatie\MediaLibrary\Downloaders\DefaultDownloader ::class, 'remote' =>, ], 'responsive_images' =>, /* * When enabling this option, a route will be registered that will enable * the Media Library Pro Vue and React components to move uploaded files * in a S3 bucket to their right place. * This is particularly useful when the url of the image is behind a firewall and * need to add additional flags, possibly using curl. */ 'jobs' =>, /* * When using the addMediaFromUrl method you may want to replace the default downloader.

Make sure * your custom jobs extend the ones provided by the package. */ 'ffmpeg_path' => env ( 'FFMPEG_PATH', '/usr/bin/ffmpeg' ), 'ffprobe_path' => env ( 'FFPROBE_PATH', '/usr/bin/ffprobe' ), /* * Here you can override the class names of the jobs used by this package. */ 'image_driver' => env ( 'IMAGE_DRIVER', 'gd' ), /* * FFMPEG & FFProbe binaries paths, only used if you try to generate video * thumbnails and have installed the php-ffmpeg/php-ffmpeg composer * dependency. */ 'temporary_directory_path' => null, /* * The engine that should perform the image conversions. * If set to null, storage_path('media-library/temp') will be used. */ 'image_generators' =>, /* * The path where to store temporary files while performing image conversions. This is the default content of the config file: return, Spatie\ImageOptimizer\Optimizers\Pngquant ::class =>, Spatie\ImageOptimizer\Optimizers\Optipng ::class =>, Spatie\ImageOptimizer\Optimizers\Svgo ::class =>, Spatie\ImageOptimizer\Optimizers\Gifsicle ::class =>, Spatie\ImageOptimizer\Optimizers\Cwebp ::class =>, ], /* * These generators will be used to create an image of media files. Publishing the config file is optional: php artisan vendor:publish -provider= "Spatie\MediaLibrary\MediaLibraryServiceProvider" -tag= "config" php artisan migrate #Publishing the config file You need to publish the migration to create the media table: php artisan vendor:publish -provider= "Spatie\MediaLibrary\MediaLibraryServiceProvider" -tag= "migrations"Īfter that, you need to run migrations. Please refer to our Media Library Pro installation instructions to continue. If you have a license for Media Library Pro, you should install spatie/laravel-media-library-pro instead. If you only use the base package issue this command: composer require "spatie/laravel-medialibrary:^10.0.0" Media Library can be installed via Composer:
