diff --git a/src/ImageResize.php b/src/ImageResize.php
index <HASH>..<HASH> 100644
--- a/src/ImageResize.php
+++ b/src/ImageResize.php
@@ -129,10 +129,10 @@ class ImageResize
      */
     public function loadFromFile($filename)
     {
-        $image_info = getimagesize($filename);
+        $image_info = @getimagesize($filename);
 
         if (!$image_info) {
-            throw new \Exception('Could not read ' . $filename);
+            throw new \Exception('Could not read ' . ($filename ?: 'file'));
         }
 
         list (
Suppress warning from getimagesize() when bad file provided, as we throw an exception later