diff --git a/src/AssetsAutoCompressComponent.php b/src/AssetsAutoCompressComponent.php
index <HASH>..<HASH> 100644
--- a/src/AssetsAutoCompressComponent.php
+++ b/src/AssetsAutoCompressComponent.php
@@ -434,7 +434,10 @@ JS
         if (!$file) {
             throw new \Exception("Unable to open file: '{$filePath}'");
         }
-        return fread($file, filesize($filePath));
+        $filesSize = filesize($filePath);
+        if($filesSize){
+            return fread($file, $filesSize);
+        }
         fclose($file);
     }
     /**
Update AssetsAutoCompressComponent.php

If file is empty, fread() is complaining about filesize.