image icon indicating copy to clipboard operation
image copied to clipboard

Image::make($url) doesn't work with urls which include non latin symbols

Open lvivphp opened this issue 4 years ago • 0 comments

Method Image::make($url) doesn't work with urls which include non latin symbols. Please check code in class intervention\image\src\Intervention\Image\AbstractDecoder.php:

209 public function isUrl() 210 { 211 return (bool) filter_var($this->data, FILTER_VALIDATE_URL); 212 }

Please, replace by some this code:

public function isUrl() { return (bool) filter_var( str_replace(['%3A', '%2F'], [':', '/'], urlencode($this->data)), FILTER_VALIDATE_URL ); }

or your variant. Thanks)

lvivphp avatar May 13 '21 08:05 lvivphp