Skip to content

Commit

Permalink
feat: add image optimizer
Browse files Browse the repository at this point in the history
  • Loading branch information
ast21 committed Nov 11, 2024
1 parent fb7e437 commit 8232ecb
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
5 changes: 3 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,13 @@
"require": {
"php": "^8.1",
"cviebrock/eloquent-sluggable": "^10.0",
"illuminate/contracts": "^10.0",
"ibecsystems/admin-kit-core": "^3.1",
"ibecsystems/admin-kit-seo": "^3.0",
"spatie/laravel-package-tools": "^1.14.0",
"illuminate/contracts": "^10.0",
"joshembling/image-optimizer": "^1.4",
"spatie/laravel-data": "^3.2",
"spatie/laravel-json-api-paginate": "^1.13",
"spatie/laravel-package-tools": "^1.14.0",
"spatie/laravel-query-builder": "^5.7"
},
"require-dev": {
Expand Down
1 change: 1 addition & 0 deletions src/UI/Filament/Resources/ArticleResource.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ public static function form(Forms\Form $form): Forms\Form
$rows[] = Forms\Components\SpatieMediaLibraryFileUpload::make('image')
->label(__('admin-kit-articles::articles.resource.image'))
->image()
->optimize('webp')
->required()
->columnSpan(2)
->imageEditor()
Expand Down

0 comments on commit 8232ecb

Please sign in to comment.