diff --git a/CompressImagesFunction/CompressImages.cs b/CompressImagesFunction/CompressImages.cs index 550526b7c..5e28459ac 100644 --- a/CompressImagesFunction/CompressImages.cs +++ b/CompressImagesFunction/CompressImages.cs @@ -186,7 +186,7 @@ private static CompressionResult[] OptimizeImages(Repository repo, string localP } FileInfo fileAfter = new FileInfo(image); - if (fileAfter.Length < before) + if (fileAfter.Length < before && fileAfter.Length > 0) { optimizedImages.Add(new CompressionResult {