add transparency support on image resizing

This commit is contained in:
sbwalker
2023-08-04 16:07:37 -04:00
parent 92a4a1b210
commit f7bd03d051
4 changed files with 20 additions and 7 deletions

View File

@ -133,7 +133,7 @@ namespace Oqtane.Shared
var url = (alias != null && !string.IsNullOrEmpty(alias.Path)) ? "/" + alias.Path : "";
mode = string.IsNullOrEmpty(mode) ? "crop" : mode;
position = string.IsNullOrEmpty(position) ? "center" : position;
background = string.IsNullOrEmpty(background) ? "000000" : background;
background = string.IsNullOrEmpty(background) ? "transparent" : background;
return $"{alias?.BaseUrl}{url}{Constants.ImageUrl}{fileId}/{width}/{height}/{mode}/{position}/{background}/{rotate}/{recreate}";
}