Skip to content

Commit

Permalink
Fix for wrong fallback image (#147)
Browse files Browse the repository at this point in the history
  • Loading branch information
patrickdemooij9 authored Jan 11, 2023
1 parent 765367d commit bba70b6
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ public object Convert(object value, IPublishedContent currentContent, string fie
var settings = _settingsService.GetSettings();
if (content.ItemType == PublishedItemType.Media)
{
if (!settings.SupportedMediaTypes.Contains(Path.GetExtension(currentContent.Url()), StringComparer.InvariantCultureIgnoreCase)) return null;
if (!settings.SupportedMediaTypes.Contains(Path.GetExtension(content.Url()), StringComparer.InvariantCultureIgnoreCase)) return null;

return string.IsNullOrWhiteSpace(settings.OpenGraphCropAlias) ? currentContent.GetCropUrl(urlMode: UrlMode.Absolute) : currentContent.GetCropUrl(settings.OpenGraphCropAlias, UrlMode.Absolute);
return string.IsNullOrWhiteSpace(settings.OpenGraphCropAlias) ? content.GetCropUrl(urlMode: UrlMode.Absolute) : content.GetCropUrl(settings.OpenGraphCropAlias, UrlMode.Absolute);
}

return content.Url(mode: UrlMode.Absolute);
Expand Down

0 comments on commit bba70b6

Please sign in to comment.