Handling media in a Laravel app
View Slide
The problemUser uploaded contentWhere to store it all?How to retrieve it?How to optimize images?
Laravel Medialibrary
Laravel MedialibraryAssociate files with Eloquent modelsCan group media into collectionsImage conversionsUses multiple filesystems
Laravel MedialibraryOptimize converted imagesCustom image generatorsCustomize directory structureCustom attributes
Add file Upload, copy, …New mediaDerived formats Srcset, crops, thumbs, …Existing model Eg. news itemDisks Local or remoteDatabase
https://docs.spatie.be/laravel-medialibrary
Demo
Wrapping up
Resourceshttps://github.com/spatie/medialibrary-demo-laracon-us https://docs.spatie.be/laravel-medialibrary/v7 https://www.youtube.com/watch?v=4lq_6JLR2H8 https://github.com/spatie/laravel-medialibrary
Coming soonVue components Uploads Administering a media collection Release Q3 - Q4 2018
TeamworkSebastian De Deyne @sebdedeyne Willem Van Bockstal @willemvbockstal Alex Vanderbist @alexvanderbist Brent Roose @brendt_gd
Thank you!Freek Van der HertenPartner & developer at SPATIEhttps://spatie.be/open-sourcehttps://ohdearapp.comhttps://murze.be