diff options
-rw-r--r-- | src/PHPImageWorkshop/ImageWorkshop.php | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/PHPImageWorkshop/ImageWorkshop.php b/src/PHPImageWorkshop/ImageWorkshop.php index 6944bdd..aebe81c 100644 --- a/src/PHPImageWorkshop/ImageWorkshop.php +++ b/src/PHPImageWorkshop/ImageWorkshop.php @@ -55,7 +55,7 @@ class ImageWorkshop */
public static function initFromPath($path, $fixOrientation = false)
{
- if (!file_exists($path)) {
+ if (false === filter_var($path, FILTER_VALIDATE_URL) && !file_exists($path)) {
throw new ImageWorkshopException(sprintf('File "%s" not exists.', $path), static::ERROR_IMAGE_NOT_FOUND);
}
|