diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..bdb06b2 --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +.idea +vendor +composer.lock \ No newline at end of file diff --git a/lib/ImageResize.php b/lib/ImageResize.php index a9001f4..1410b72 100644 --- a/lib/ImageResize.php +++ b/lib/ImageResize.php @@ -77,7 +77,9 @@ public function __construct($filename) throw new ImageResizeException('Unsupported file type'); } - $image_info = getimagesize($filename,$this->source_info); + if (!$image_info = getimagesize($filename, $this->source_info)) { + $image_info = getimagesize($filename); + } if (!$image_info) { throw new ImageResizeException('Could not read file');