diff --git a/composer.json b/composer.json index ab03feb..f0005c4 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/VacancyResource.php b/src/UI/Filament/Resources/VacancyResource.php index ce3daf8..7dd7292 100644 --- a/src/UI/Filament/Resources/VacancyResource.php +++ b/src/UI/Filament/Resources/VacancyResource.php @@ -25,7 +25,9 @@ public static function form(Forms\Form $form): Forms\Form ->collection('main') ->image() ->columnSpan(2) - ->required(), + ->required() + ->optimize('webp') + ->resize(30), TranslatableTabs::make(fn ($locale) => Forms\Components\Tabs\Tab::make($locale)->schema([ Forms\Components\TextInput::make('title.'.$locale) ->label(__('admin-kit-vacancy::vacancy.resource.title'))