public static function uploadFromUrl($imgUrl, $shortPath = 'uploads/images/') { $shortPath = File::uploadFromUrl($imgUrl, $shortPath); $result = self::isImage($shortPath); if (!$result) { File::remove($shortPath); return false; } return $shortPath; }