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 ecc8b0b commit 9379e57
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/InfographicResource.php
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 9379e57

Please sign in to comment.