Skip to content

Commit 2a2658c

Browse files
LucaRedifox
authored andcommitted
Add "null" for the free cropping
1 parent 4a6c561 commit 2a2658c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/content/1_docs/7_media-library/03_role-crop-params.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ A _role_ is a way to define different contexts in which an image might be placed
66

77
_Crops_ are more self-explanatory. Twill comes with some pre-defined crop settings to allow you to set different variants of a given image, so crops can be used in combination with _roles,_ or they can be used on their own with a single role to define multiple cropping ratios on the same image.
88

9-
Using the Person example, your `cover` image could have a `square` crop for mobile screens, but could use a `16/9` crop on larger screens. Those values are editable at your convenience for each model in the `ratio` option, even if there are already some crops created in the CMS. By specifying `0` as a `ratio`, no automatic crop will happen and you'll be able to crop freely.
9+
Using the Person example, your `cover` image could have a `square` crop for mobile screens, but could use a `16/9` crop on larger screens. Those values are editable at your convenience for each model in the `ratio` option, even if there are already some crops created in the CMS. By specifying `null` or `0` as a `ratio`, no automatic crop will happen and you'll be able to crop freely.
1010

1111
The only thing you have to do to make it work is to compose your model and repository with the appropriate traits, respectively `HasMedias` and `HandleMedias`, set up your `$mediasParams` configuration and use the `medias` form partial in your form view (more info in the CRUD section).
1212

0 commit comments

Comments
 (0)