diff --git a/src/Umbraco.Web/PropertyEditors/ImageCropperPropertyValueEditor.cs b/src/Umbraco.Web/PropertyEditors/ImageCropperPropertyValueEditor.cs index 7bea54252132..e5d98804be74 100644 --- a/src/Umbraco.Web/PropertyEditors/ImageCropperPropertyValueEditor.cs +++ b/src/Umbraco.Web/PropertyEditors/ImageCropperPropertyValueEditor.cs @@ -174,7 +174,12 @@ public override string ConvertDbToString(PropertyType propertyType, object value // more magic here ;-( var configuration = dataTypeService.GetDataType(propertyType.DataTypeId).ConfigurationAs(); var crops = configuration?.Crops ?? Array.Empty(); - return "{src: '" + val + "', crops: " + crops + "}"; + + return JsonConvert.SerializeObject(new + { + src = val, + crops = crops + }); } } }