I have an image called "image" and the cropped version is called "SideImage". How can I use the cropped version of the image? The image is not saved in the media area.
<img src="@Model.Value("bild")"/>
I tried using .GetCropUrl() but it didn't work. Do I need to use a using or a package?
It's a while since I've used an ImageCropper as a property directly on a Document Type, I usually use a Media Picker (and MediaPicker3 allows you to access crop functionality) BUT
I think you can use GetCropUrl(), there is a method here:
that is a UrlHelper extensions, and seems to take the 'value' of the ImageCropper property, and then the name of the crop (and lots of other optional values)
Image Cropper
I have an image called "image" and the cropped version is called "SideImage". How can I use the cropped version of the image? The image is not saved in the media area.
I tried using .GetCropUrl() but it didn't work. Do I need to use a using or a package?
Hi Jasmin
It's a while since I've used an ImageCropper as a property directly on a Document Type, I usually use a Media Picker (and MediaPicker3 allows you to access crop functionality) BUT
I think you can use GetCropUrl(), there is a method here:
https://github.com/umbraco/Umbraco-CMS/blob/5bfab13dc5a268714aad2426a2b68ab5561a6407/src/Umbraco.Web.Common/Extensions/UrlHelperExtensions.cs#L262
that is a UrlHelper extensions, and seems to take the 'value' of the ImageCropper property, and then the name of the crop (and lots of other optional values)
So hopefully something like this?
Namespace would be: Umbraco.Extensions
regards
Marc
is working on a reply...