Skip to content

How to crop images #17

Answered by dietercoopman
macCesar asked this question in Q&A
Dec 16, 2021 · 1 comments · 1 reply
Discussion options

You must be logged in to vote

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]
            ]
        ]
    ]
];

This is the result

Kind regards Dieter

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@macCesar
Comment options

Answer selected by dietercoopman
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants