How to crop images #17
-
Is there a way to auto-crop images by setting width and height ??
Maybe you can use the
BTW, Thanks for this excellent component!!! |
Beta Was this translation helpful? Give feedback.
Answered by
dietercoopman
Dec 16, 2021
Replies: 1 comment 1 reply
-
Hi @macCesar you can crop images with a template , this is an example using this configuration return [
'image' => [
'path' => 'smart',
'templates' => [
'crop' => [
'resize' => [null, 200, ['aspectRatio']],
'crop' => [100, 100, 25, 25]
]
]
]
]; Kind regards Dieter |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
dietercoopman
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi @macCesar you can crop images with a template , this is an example using this configuration
This is the result
Kind regards Dieter