Merge branch 'master' of git.cassandrecantet.fr:meoran/images
This commit is contained in:
@@ -83,7 +83,7 @@ class Image extends Model
|
||||
if (empty($basePath)) {
|
||||
throw new \Exception('You must defined config image.path');
|
||||
}
|
||||
$parts = array_slice(str_split(mb_strtolower(str_slug($filename, '')), 2), 0, 2);
|
||||
$parts = array_slice(str_split(md5($filename), 2), 0, 2);
|
||||
$path = $basePath . '/' . implode('/', $parts) . '/' . $filename;
|
||||
|
||||
return $path;
|
||||
|
@@ -21,6 +21,7 @@ class ImagesServiceProvider extends ServiceProvider
|
||||
|
||||
$this->loadMigrationsFrom(__DIR__ . '/../../database/migrations');
|
||||
$this->mergeConfigFrom(__DIR__ . '/../../config/image.php', 'image');
|
||||
$this->mergeConfigFrom(__DIR__ . '/../../config/image-optimizer.php', 'image-optimizer');
|
||||
|
||||
|
||||
$this->app->register(ImageServiceProvider::class);
|
||||
|
Reference in New Issue
Block a user