-
Notifications
You must be signed in to change notification settings - Fork 91
Examples
Robert Reinhard edited this page Sep 18, 2015
·
5 revisions
- Source files in
/www/public/uploads/
- Crops should be created in
/www/public/uploads/
'src_dir' => public_path().'/uploads',
'crops_dir' => public_path().'/uploads',
'path' => 'uploads/(.*)$',
Croppa::url('/uploads/01/02/file.jpg', 200, 100);
// returns /uploads/01/02/file-200x100.jpg
// crop created at `/www/public/uploads/01/02/file-200x100.jpg`
- Source files in
/www/public/images/
- Crops should be created in
/www/public/images/thumbs/
'src_dir' => public_path().'/images',
'crops_dir' => public_path().'/images/thumbs',
'path' => 'images/(?:thumbs/)?(.*)$',
'url_prefix' => '/images/thumbs/',
Croppa::url('/images/file.jpg', 200, 100);
// returns /images/thumbs/file-200x100.jpg
// crop created at `/www/public/images/thumbs/file-200x100.jpg`
- Source files in
/www/storage/app/
- Crops should be created in
/www/public/images/thumbs/
'src_dir' => storage_path().'/app/images',
'crops_dir' => public_path().'/images',
'path' => 'images/(.*)$',
Croppa::url('/images/file.jpg', 200, 100);
// returns /images/file-200x100.jpg
// crop created at `/www/public/images/file-200x100.jpg`