diff --git a/composer.json b/composer.json index 25aad40..ad71863 100644 --- a/composer.json +++ b/composer.json @@ -24,7 +24,8 @@ "spatie/laravel-data": "^3.2", "spatie/laravel-json-api-paginate": "^1.13", "spatie/laravel-query-builder": "^5.7", - "spatie/laravel-translatable": "^6.5" + "spatie/laravel-translatable": "^6.5", + "joshembling/image-optimizer": "^1.4" }, "require-dev": { "laravel/pint": "^1.0", diff --git a/src/UI/Filament/Resources/InfographicResource.php b/src/UI/Filament/Resources/InfographicResource.php index 3bc3381..2544b3f 100644 --- a/src/UI/Filament/Resources/InfographicResource.php +++ b/src/UI/Filament/Resources/InfographicResource.php @@ -27,7 +27,9 @@ public static function form(Forms\Form $form): Forms\Form ->label(__('admin-kit-infographics::infographics.resource.background')) ->image() ->required() - ->columnSpan(2), + ->columnSpan(2) + ->optimize('webp') + ->resize(30), Forms\Components\Section::make('Кнопка действия')->schema([ TranslatableTabs::make(fn ($locale) => Tab::make($locale)->schema([ Forms\Components\TextInput::make('action_title.'.$locale)