From d8ee38573b35d9875a4711d540c7c2d49b1d75c2 Mon Sep 17 00:00:00 2001 From: Wisp X Date: Wed, 19 Jan 2022 09:38:38 +0800 Subject: [PATCH] =?UTF-8?q?:bug:=20=E4=BF=AE=E5=A4=8D=20BUG?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Service/ImageService.php | 2 +- config/image.php | 3 +-- database/seeders/DatabaseSeeder.php | 2 +- resources/views/components/upload.blade.php | 7 ++++--- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/app/Service/ImageService.php b/app/Service/ImageService.php index 7042e84a..a0c1cf6f 100644 --- a/app/Service/ImageService.php +++ b/app/Service/ImageService.php @@ -26,7 +26,7 @@ use Illuminate\Support\Collection; use Illuminate\Support\Facades\DB; use Illuminate\Support\Str; use Intervention\Image\Facades\Image as InterventionImage; -use Intervention\Image\Gd\Font; +use Intervention\Image\Imagick\Font; use Intervention\Image\ImageManager; use League\Flysystem\Filesystem; use League\Flysystem\FilesystemAdapter; diff --git a/config/image.php b/config/image.php index 2b1d2c3e..6f967d0a 100644 --- a/config/image.php +++ b/config/image.php @@ -15,6 +15,5 @@ return [ | */ - 'driver' => 'gd' - + 'driver' => 'imagick' ]; diff --git a/database/seeders/DatabaseSeeder.php b/database/seeders/DatabaseSeeder.php index 4cbdfba2..9ebf3b24 100644 --- a/database/seeders/DatabaseSeeder.php +++ b/database/seeders/DatabaseSeeder.php @@ -80,7 +80,7 @@ class DatabaseSeeder extends Seeder GroupConfigKey::LimitPerDay => 300, GroupConfigKey::LimitPerWeek => 600, GroupConfigKey::LimitPerMonth => 999, - GroupConfigKey::AcceptedFileSuffixes => ['jpg', 'jpeg', 'gif', 'png', 'apng', 'bmp', 'ico'], + GroupConfigKey::AcceptedFileSuffixes => ['jpeg', 'png', 'gif', 'tif', 'bmp', 'ico', 'psd', 'webp'], GroupConfigKey::PathNamingRule => '{Y}/{m}/{d}', GroupConfigKey::FileNamingRule => '{uniqid}', ])->toJson(), diff --git a/resources/views/components/upload.blade.php b/resources/views/components/upload.blade.php index 81885dd0..354a1e09 100644 --- a/resources/views/components/upload.blade.php +++ b/resources/views/components/upload.blade.php @@ -79,11 +79,13 @@ @push('scripts') @if(Auth::check() && Auth::user()->group) @else @endif