Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update storing-media-specific-manipulations.md #3768

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions docs/advanced-usage/storing-media-specific-manipulations.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Here's a quick example:
$yourModel
->addMedia($pathToFile)
->withManipulations([
'thumb' => ['orientation' => '90'],
'thumb' => ['orientation' => ['orientation' => ['orientation' => '90']]],
]);
```

Expand All @@ -24,7 +24,7 @@ You can also apply media specific manipulations to an existing `Media` instance.
```php
$mediaItems = $yourModel->getMedia('images');
$mediaItems[0]->manipulations = [
'thumb' => ['orientation' => '90'],
'thumb' => ['orientation' => ['orientation' => '90']],
];

// This will cause the thumb conversions to be regenerated.
Expand All @@ -39,8 +39,8 @@ Of course you can also set media specific manipulations for multiple conversions
$yourModel
->addMedia($pathToFile)
->withManipulations([
'thumb' => ['orientation' => '90'],
'otherConversion' => ['orientation' => '90'],
'thumb' => ['orientation' => ['orientation' => '90']],
'otherConversion' => ['orientation' => ['orientation' => '90']],
]);
```

Expand All @@ -55,7 +55,7 @@ Here's an example:
$yourModel
->addMedia($pathToFile)
->withManipulations([
'*' => ['orientation' => '90'],
'*' => ['orientation' => ['orientation' => '90']],
]);
```

Expand All @@ -65,7 +65,7 @@ You can also combine wildcard manipulations with one for a specific collection.
$yourModel
->addMedia($pathToFile)
->withManipulations([
'*' => ['orientation' => '90'],
'thumb' => ['filter' => 'greyscale'],
'*' => ['orientation' => ['orientation' => '90']],
'thumb' => ['greyscale' => []],
]);
```
Loading