- π«π·France Grimreaper France π«π·
Hi,
For information, there is a related issue in Entity Share β¨ Support Crop API Active .
- Merge request !9New computed field to add relation to image crop data β (Open) created by sickness29
- Status changed to Needs review
about 1 year ago 12:23pm 10 May 2024 - πΊπ¦Ukraine sickness29
Created MR to add computed field which contains crop data for image. Now it should be available in jsonapi relationships under "crop"
- πΊπΈUnited States pbabin
Thank you @sickness29!
We're running Crop 8.x-2.4 and Drupal 10.3.2. We applied MR !9 and tested @grimreaper's β¨ Support Crop API Active . Our setup is now bringing over the crops and displaying as our users desire.
- Status changed to RTBC
3 months ago 10:21pm 29 April 2025 - πΊπΈUnited States pbabin
Bumping for inclusion - we have tested in our instance for over 8 months now. Additionally, two other members of the community have confirmed that this is working for our use in conjunction with Entity Share - https://www.drupal.org/project/entity_share/issues/3220320 β¨ Support Crop API Active
- π§πͺBelgium dieterholvoet Brussels
Note: the
administer crop
permission is required to fetch information about crops through JSON:API. Ideally, there would be a separate permission to view crops. - π§πͺBelgium dieterholvoet Brussels
There's still an issue here: if a file has multiple crops of the same type, all these crops are returned. In
CropStorageInterface::getCrop()
a database query fetches all crops keyed by type, making sure that only the last crop of each type is returned. The Crop API module currently has no way to expose old crops, so I think we should keep that consistent here.