U4-8751 GetCropUrl method should have a parameter for specifying the image format

Additional fix asking for InvariantContains instead of just Contains
This commit is contained in:
Sebastiaan Janssen
2016-08-02 15:07:25 +02:00
parent d611ae85e1
commit e020779a14

View File

@@ -302,11 +302,11 @@ namespace Umbraco.Web
}
}
bool hasFormat = furtherOptions != null && furtherOptions.Contains("&format=");
var hasFormat = furtherOptions != null && furtherOptions.InvariantContains("&format=");
//Only put quality here, if we don't have a format specified.
//Otherwise we need to put quality at the end to avoid it being overridden by the format.
if (quality != null && !hasFormat)
if (quality != null && hasFormat == false)
{
imageProcessorUrl.Append("&quality=" + quality);
}