GetCropUrl - needed to get the url from within the json within the check for a crop otherwise a exception can occur
This commit is contained in:
@@ -56,15 +56,15 @@ namespace Umbraco.Web
|
||||
if (mediaItem.HasPropertyAndValueAndCrop(propertyAlias, cropAlias))
|
||||
{
|
||||
imageCropperValue = mediaItem.GetPropertyValue<string>(propertyAlias);
|
||||
|
||||
//get the raw value (this will be json)
|
||||
var urlValue = mediaItem.GetPropertyValue<string>(propertyAlias);
|
||||
|
||||
mediaItemUrl = urlValue.DetectIsJson()
|
||||
? urlValue.SerializeToCropDataSet().Src
|
||||
: urlValue;
|
||||
}
|
||||
|
||||
//get the raw value (this will be json)
|
||||
var urlValue = mediaItem.GetPropertyValue<string>(propertyAlias);
|
||||
|
||||
mediaItemUrl = urlValue.DetectIsJson()
|
||||
? urlValue.SerializeToCropDataSet().Src
|
||||
: urlValue;
|
||||
|
||||
return mediaItemUrl != null
|
||||
? GetCropUrl(mediaItemUrl, width, height, quality, imageCropMode, imageCropAnchor, imageCropperValue, cropAlias, furtherOptions)
|
||||
: string.Empty;
|
||||
|
||||
Reference in New Issue
Block a user