Speaker Deck
Speaker Deck Pro
Sign in
Sign up
for free
Handling media in a Laravel app (Laracon US)
Freek Van der Herten
July 25, 2018
Programming
1
820
Handling media in a Laravel app (Laracon US)
Freek Van der Herten
July 25, 2018
Tweet
Share
More Decks by Freek Van der Herten
See All by Freek Van der Herten
freekmurze
0
190
freekmurze
1
360
freekmurze
1
190
freekmurze
0
340
freekmurze
0
110
freekmurze
1
320
freekmurze
0
310
freekmurze
0
100
freekmurze
0
46
Other Decks in Programming
See All in Programming
masayaaoyama
4
520
daiki1020
0
1.1k
ufoo68
1
170
zsmb
1
120
manfredsteyer
PRO
0
230
77web
0
210
kazaman97
0
160
momofff
0
160
rishitdagli
0
170
atskimura
0
290
blendthink
0
390
attsumi
1
350
Featured
See All Featured
bkeepers
52
4.1k
sachag
267
17k
samanthasiow
56
6.3k
gr2m
83
11k
jnunemaker
PRO
40
4.5k
iamctodd
17
1.8k
destraynor
223
47k
danielanewman
200
19k
sferik
609
54k
kneath
219
15k
smashingmag
229
18k
malarkey
192
8.5k
Transcript
Handling media in a Laravel app
The problem User uploaded content Where to store it all?
How to retrieve it? How to optimize images?
Laravel Medialibrary
Laravel Medialibrary Associate files with Eloquent models Can group media
into collections Image conversions Uses multiple filesystems
Laravel Medialibrary Optimize converted images Custom image generators Customize directory
structure Custom attributes
Add file Upload, copy, … New media Derived formats Srcset,
crops, thumbs, … Existing model Eg. news item Disks Local or remote Database
https://docs.spatie.be/laravel-medialibrary
None
Demo
Wrapping up
Resources https://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 soon Vue components Uploads Administering a media
collection Release Q3 - Q4 2018
Teamwork Sebastian De Deyne @sebdedeyne Willem Van Bockstal @willemvbockstal
Alex Vanderbist @alexvanderbist Brent Roose @brendt_gd
Thank you! Freek Van der Herten Partner & developer at
SPATIE https://spatie.be/open-source https://ohdearapp.com https://murze.be