When I try to use the croppedImage file method, I’m getting an error (see image attached). I’m using the plugin inside a structure field, so what I’m trying to do to get the values stored via crop field is
so I can’t do $slide->backdrop()->toFile()->crop->x(); because that conflicts with kirby’s crop() thingy – but maybe I could figure out where the plugin assigns Crop to the file and change that to something else…
I was trying to get the x-position of the cropped area this way. (imageCrop field in the panel was previously called crop, also I made a typo in this forum post – crop should have been crop()).
What led me to believe this was possible is the fact that the generated .txt files of images with the visual crop plugin contain values like this:
But firstly, this is not the correct syntax in order to be able to retrieve the values that way. And secondly Kirby has a file function called crop() which was conflicting.
I renamed the field from crop to imageCrop and I am finally able to retrieve the wanted values like this: