Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes #10402 - GetCropUrl Url extension has duplicate signatures and results in error #10524

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions src/Umbraco.Web/UrlHelperRenderExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
using System.Web;
using System.Web.Mvc;
using Umbraco.Core;
using Umbraco.Core.Models;
using Umbraco.Core.Models.PublishedContent;
using Umbraco.Core.PropertyEditors.ValueConverters;
using Umbraco.Web.Composing;
Expand Down Expand Up @@ -262,8 +263,8 @@ public static IHtmlString GetCropUrl(this UrlHelper urlHelper,
return htmlEncode ? new HtmlString(HttpUtility.HtmlEncode(url)) : new HtmlString(url);
}

public static IHtmlString GetCropUrl(this UrlHelper urlHelper,
ImageCropperValue imageCropperValue,
public static IHtmlString GetLocalCropUrl(this UrlHelper urlHelper,
MediaWithCrops mediaWithCrops,
string cropAlias,
int? width = null,
int? height = null,
Expand All @@ -278,6 +279,7 @@ public static IHtmlString GetCropUrl(this UrlHelper urlHelper,
bool upScale = true,
bool htmlEncode = true)
{
var imageCropperValue = mediaWithCrops.LocalCrops;
if (imageCropperValue == null) return EmptyHtmlString;

var imageUrl = imageCropperValue.Src;
Expand Down