Skip to content

Commit

Permalink
Convert to lower case in switch function to cover edge cases.
Browse files Browse the repository at this point in the history
If the image extension is in caps, the code will exit without resizing the image.
  • Loading branch information
ChaitanyaNaykodi-MSFT authored Sep 15, 2020
1 parent c2a5d34 commit 25760dc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ImageFunctions/Thumbnail.cs
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ private static IImageEncoder GetEncoder(string extension)

if (isSupported)
{
switch (extension)
switch (extension.ToLower())
{
case "png":
encoder = new PngEncoder();
Expand Down

0 comments on commit 25760dc

Please sign in to comment.