diff --git a/src/Support/ImageMeta.php b/src/Support/ImageMeta.php index 5c14a9c..209d83b 100644 --- a/src/Support/ImageMeta.php +++ b/src/Support/ImageMeta.php @@ -2,6 +2,8 @@ namespace RalphJSmit\Laravel\SEO\Support; +use const FILTER_VALIDATE_URL; + use Exception; class ImageMeta @@ -14,6 +16,10 @@ public function __construct(string $path) { $publicPath = public_path($path); + if (filter_var($path, FILTER_VALIDATE_URL)) { + return; + } + if (! is_file($publicPath)) { report(new Exception("Path {$publicPath} is not a file."));