In version 7 of the spatie/laravel-medialibrary all conversions created with version 6 needs to be renamed with the original name in front of it.
This package adds a command php artisan upgrade-media
that renames your current media.
It will analyse the folder structure and rename where needed. For example from:
media
├── 1
│ ├── conversions
│ │ └── thumb.png
│ └── red-square.png
└── 2
├── conversions
│ └── thumb.png
└── green-circle.png
to:
media
├── 1
│ ├── conversions
│ │ └── red-square-thumb.png
│ └── red-square.png
└── 2
├── conversions
│ └── green-circle-thumb.png
└── green-circle.png
We invest a lot of resources into creating best in class open source packages. You can support us by buying one of our paid products.
We highly appreciate you sending us a postcard from your hometown, mentioning which of our package(s) you are using. You'll find our address on our contact page. We publish all received postcards on our virtual postcard wall.
You can install the package via composer:
composer require spatie/laravel-medialibrary-v6-to-v7-filesystem-upgrade
The command can handle any custom path and if you already converted some files (or added new ones) it will leave them.
We recommend to do a dry-run first like this:
php artisan upgrade-media --dry-run
or like this:
php artisan upgrade-media -d
If the correct files are listed you can use this command to do the actual conversion:
php artisan upgrade-media
When you want to use a disk that is not the default_filesystem
in the medialibrary.php
config file use:
php artisan upgrade-media s3
To convert your media in production, the --force
or -f
option comes to the rescue:
php artisan upgrade-media --force
or:
php artisan upgrade-media -f
composer test
Please see CHANGELOG for more information what has changed recently.
Please see CONTRIBUTING for details.
If you've found a bug regarding security please mail security@spatie.be instead of using the issue tracker.
You're free to use this package, but if it makes it to your production environment we highly appreciate you sending us a postcard from your hometown, mentioning which of our package(s) you are using.
Our address is: Spatie, Kruikstraat 22, 2018 Antwerp, Belgium.
We publish all received postcards on our company website.
The MIT License (MIT). Please see License File for more information.