hey, i’m trying to use the mage Crop Field Plugin by @steirico in combination with the kirby kql api to access the cropped image.
unfortunatley this doesn’t work:
{
"query": "page('galerie').children",
"select": {
"images": "page.images.croppedImages"
}
}
has someone tried this before? or is basically possible to query also for random plugin-querys with the api?
There is no croppedImages
method, maybe try
"page.images.filterBy('croppedImage')"
I’ve tooked the croppedImage from the blueprint-query-example here .
The proposed filterby approach is giving me this:
{"status":"error","message":"Trying to access array offset on value of type null","code":2,"key":null,"details":[]}
Johannes_Timpernagel:
croppedImage
Exactly, as the readme explains, this is a file
method, so you can call it on a single file, not on a collection of images. I would have expected that it is also possible to filter by this method somehow.
Thanks @texnixe for the quick response. I will now look for another solution for cropping images in the panel and getting the result via the API.