Skip to content

Commit

Permalink
feat: add image optimizer
Browse files Browse the repository at this point in the history
  • Loading branch information
daurensky committed Mar 19, 2024
1 parent 744c0f0 commit 67854b0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 2 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
4 changes: 3 additions & 1 deletion src/UI/Filament/Resources/VacancyResource.php
Original file line number Diff line number Diff line change
Expand Up @@ -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'))
Expand Down

0 comments on commit 67854b0

Please sign in to comment.