demo
demo copied to clipboard
Use spatie/laravel-medialibrary for all medias
Hello,
I noticed that spatie/laravel-medialibrary is only used for the shop Product model.
As a result, the storage/app/public folder is messy with a lot of images at the root.
In this PR:
- Three (3) media collections are explicitly defined:
product-images,link-images, andpost-images; - Each media collection uses its own disk, defined in
config/filesystems.php; - The
post-imagesandlink-imagesmedia collections are single file collections - The Filament resources were modified to get the images from the correct media collection
- A
thumbmedia conversion is defined for all media collections - The thumbnails are loaded on the Filament infolists / tables instead of the full images
- The full images are loaded on the views / edit pages
- The collections only accept
image/jpegfiles and this rule is enforced in Filament as well - Product images are reorderable
- The
blog_links.imageandblog_posts.imagefields are dropped