Skip to content

Commit

Permalink
chore: README thumb instructions
Browse files Browse the repository at this point in the history
  • Loading branch information
iberflow committed Mar 22, 2023
1 parent d74464b commit 2738d13
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
## Features

- For Laravel Nova ^4.0
- Multiple image upload into a `spatie/laravel-medialibrary` collection.
- Multiple image and video upload into a `spatie/laravel-medialibrary` collection.
- Image sorting
- Custom Image Validation
- Drag & Drop
Expand Down Expand Up @@ -83,6 +83,19 @@ $schedule->call(function () {

7. Use the `help()` method if you want to place "help" text inside the Drag & Drop area.

8. Use the `thumbConversion()` to change the default conversion name for the image thumbnail.

```php
// add this method to your model with InteractsWithMedia trait
public function registerMediaConversions(Media $media = null): void
{
$this
->addMediaConversion('thumb') // thumbConversion customizes this
->fit(Manipulations::FIT_CROP, 300, 300)
->nonQueued();
}
```

### Example

```php
Expand Down

0 comments on commit 2738d13

Please sign in to comment.