The way I normally add the Image Cropper functionality to images uploaded to the Media Section, is to update the existing Image Media Type's 'umbracoFile' property to use a Data Type based on the Image Cropper.
Now when files are uploaded to the media section I can see their crops
And if I have a document type that has picked a media Item say for a property called relatedImage, I can get it's CroppedUrl using GetCropUrl...
@{
string croppedImageUrl = String.Empty;
var relatedImage = Umbraco.TypedMedia(model.Content.GetPropertyValue("relatedImage"));
if (relatedImage != null)
{
croppedImageUrl = relatedImage.GetCropUrl("CropAlias");
}
}
Image Cropper - Is there a way to use media instead of file upload?
I'm using umbraco7 and ucomponents is not an option as it does not support it.
Hi Christopher
The way I normally add the Image Cropper functionality to images uploaded to the Media Section, is to update the existing Image Media Type's 'umbracoFile' property to use a Data Type based on the Image Cropper.
Now when files are uploaded to the media section I can see their crops
And if I have a document type that has picked a media Item say for a property called relatedImage, I can get it's CroppedUrl using GetCropUrl...
Many thanks. I'm trying to use image cropper as hotspot
Chris, you might by interested to watch uHangOut Episode 30 which is when I introduced the v7 Image Cropper and walked through how to use it
Jeavon
Comment author was deleted
+1 to Marc's answer!
is working on a reply...