* The disk on which to store added files and derived images by default. Choose
* one or more of the disks you've configured in config/filesystems.php.
*/
- 'disk_name' => 'public',
+ 'disk_name' => env('MEDIA_DISK', 'public'),
/*
* The maximum file size of an item in bytes.
* Adding a larger file will result in an exception.
*/
- 'max_file_size' => 1024 * 1024 * 1024,
+ 'max_file_size' => 1024 * 1024 * 10,
/*
* This queue will be used to generate derived and responsive images.
/*
* The fully qualified class name of the media model.
*/
- 'media_model' => Spatie\MediaLibrary\Models\Media::class,
-
- 's3' => [
- /*
- * The domain that should be prepended when generating urls.
- */
- 'domain' => 'https://'.env('AWS_BUCKET').'.s3.amazonaws.com',
- ],
+ 'media_model' => Spatie\MediaLibrary\MediaCollections\Models\Media::class,
'remote' => [
/*
'responsive_images' => [
/*
- * This class is responsible for calculating the target widths of the responsive
- * images. By default we optimize for filesize and create variations that each are 20%
- * smaller than the previous one. More info in the documentation.
- *
- * https://docs.spatie.be/laravel-medialibrary/v7/advanced-usage/generating-responsive-images
- */
+ * This class is responsible for calculating the target widths of the responsive
+ * images. By default we optimize for filesize and create variations that each are 20%
+ * smaller than the previous one. More info in the documentation.
+ *
+ * https://docs.spatie.be/laravel-medialibrary/v8/advanced-usage/generating-responsive-images
+ */
'width_calculator' => Spatie\MediaLibrary\ResponsiveImages\WidthCalculator\FileSizeOptimizedWidthCalculator::class,
/*
'tiny_placeholder_generator' => Spatie\MediaLibrary\ResponsiveImages\TinyPlaceholderGenerator\Blurred::class,
],
+ /*
+ * When converting Media instances to response the medialibrary will add
+ * a `loading` attribute to the `img` tag. Here you can set the default
+ * value of that attribute.
+ *
+ * Possible values: 'auto', 'lazy' and 'eager,
+ *
+ * More info: https://css-tricks.com/native-lazy-loading/
+ */
+ 'default_loading_attribute_value' => 'auto',
+
+ /*
+ * This is the class that is responsible for naming conversion files. By default,
+ * it will use the filename of the original and concatenate the conversion name to it.
+ */
+ 'conversion_file_namer' => \Spatie\MediaLibrary\Conversions\DefaultConversionFileNamer::class,
+
+ /*
+ * The class that contains the strategy for determining a media file's path.
+ */
+ 'path_generator' => Spatie\MediaLibrary\Support\PathGenerator\DefaultPathGenerator::class,
+
/*
* When urls to files get generated, this class will be called. Leave empty
* if your files are stored locally above the site root or on s3.
*/
- 'url_generator' => null,
+ 'url_generator' => Spatie\MediaLibrary\Support\UrlGenerator\DefaultUrlGenerator::class,
/*
- * The class that contains the strategy for determining a media file's path.
+ * Whether to activate versioning when urls to files get generated.
+ * When activated, this attaches a ?v=xx query string to the URL.
*/
- 'path_generator' => null,
+ 'version_urls' => false,
/*
- * Medialibrary will try to optimize all converted images by removing
+ * MediaLibrary will try to optimize all converted images by removing
* metadata and applying a little bit of compression. These are
* the optimizers that will be used by default.
*/
* These generators will be used to create an image of media files.
*/
'image_generators' => [
- Spatie\MediaLibrary\ImageGenerators\FileTypes\Image::class,
- Spatie\MediaLibrary\ImageGenerators\FileTypes\Webp::class,
- Spatie\MediaLibrary\ImageGenerators\FileTypes\Pdf::class,
- Spatie\MediaLibrary\ImageGenerators\FileTypes\Svg::class,
- Spatie\MediaLibrary\ImageGenerators\FileTypes\Video::class,
+ Spatie\MediaLibrary\Conversions\ImageGenerators\Image::class,
+ Spatie\MediaLibrary\Conversions\ImageGenerators\Webp::class,
+ Spatie\MediaLibrary\Conversions\ImageGenerators\Pdf::class,
+ Spatie\MediaLibrary\Conversions\ImageGenerators\Svg::class,
+ Spatie\MediaLibrary\Conversions\ImageGenerators\Video::class,
],
/*
* The engine that should perform the image conversions.
* Should be either `gd` or `imagick`.
*/
- 'image_driver' => 'gd',
+ 'image_driver' => env('IMAGE_DRIVER', 'gd'),
/*
* FFMPEG & FFProbe binaries paths, only used if you try to generate video
* your custom jobs extend the ones provided by the package.
*/
'jobs' => [
- 'perform_conversions' => Spatie\MediaLibrary\Jobs\PerformConversions::class,
- 'generate_responsive_images' => Spatie\MediaLibrary\Jobs\GenerateResponsiveImages::class,
+ 'perform_conversions' => \Spatie\MediaLibrary\Conversions\Jobs\PerformConversionsJob::class,
+ 'generate_responsive_images' => \Spatie\MediaLibrary\ResponsiveImages\Jobs\GenerateResponsiveImagesJob::class,
],
];