Umbraco 12 Delivery Api Media Crop url
# help-with-umbraco
d
When using Umbraco 12's Content Delivery Api, it is possible to get the Crop Urls for media in the output?
p
@Dave de Moel I think they are already returned in the form of [ApiMediaWithCrops]?(https://github.com/umbraco/Umbraco-CMS/blob/v12/dev/src/Umbraco.Infrastructure/Models/DeliveryApi/ApiMediaWithCrops.cs)
j
Is it possible to get an image by its crop alias in the media URL? I have tried with explicit width & height and it works. But if I have predefined crops I guess it should be possible to use those instead of dimensions? Tried ?alias= ?name= ?crop= etc without luck. Anyone who knows?
s
I found something that you need to calculate the rxy for the image as well as per this post: https://our.umbraco.com/forum/using-umbraco-and-getting-started/113388-making-an-http-request-to-get-cropped-images But I cant quite get it to work (like, the crop might be super zoomed on a face, but still wont show that crop)
8 Views