Forum
Example image syntax
Hello,
I have found the image entry in the documentation. It refers to many different capabilities, however does not provide examples showing the syntax for the more advanced features (eg. crop). Could you please provide an example.
As stated on the docs located here: https://docs.grabaperch.com/templates/field-types/image/ - crop is a boolean value, i.e. true or false. So you can add it to images like so:
OK, I had read that, but it leaves a few unanswered questions.
Is it possible to resize and crop?
Is it possible to crop without resizing?
Is it possible to control the origin point of the crop (top left, centre, centre)?
Does your syntax resize an image then crop it? Or simply crop it to the provided dimensions.
Yes, specifying dimensions and crop will resize and crop.
It's not, no.
Not currently - it's always the centre.
It resizes to fit a bounding box and then crops the excess.
Cheers Drew. Thanks for that.