Skip to content

Commit

Permalink
Fixed UseWebP option
Browse files Browse the repository at this point in the history
  • Loading branch information
usercode committed Apr 11, 2022
1 parent dfe62ab commit b44324c
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/ImageWizard/Startup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,13 @@ public void ConfigureServices(IServiceCollection services)

if (options.Value.UseWebP)
{
if (x.ImageFormat is JpegFormat or PngFormat)
if (x.ImageFormat is JpegFormat)
{
x.ImageFormat = new WebPFormat();
x.ImageFormat = new WebPFormat() { Lossless = false };
}
else if(x.ImageFormat is PngFormat)
{
x.ImageFormat = new WebPFormat() { Lossless = true };
}
}

Expand Down

0 comments on commit b44324c

Please sign in to comment.