public static function fromUrl($url, $width, $height = 0)
    {

        $extension = pathinfo(strtok($url, '?'), PATHINFO_EXTENSION);

        $filename = sprintf('%s/thumb_%s.%s', sys_get_temp_dir(), md5($url), $extension);

        if (! file_exists($filename) && ! @copy($url, $filename, static::getStreamContextOptions())) {

            return static::$config['fallback'];
        }

        $urlizer = new Urlizer();

        static::configureUrlizer($urlizer);
        
        $thumb = new static($filename, $width, $height);

        $basename = $thumb->generateBasename();

        $filename = $urlizer->buildThumbFilename($basename);

        $thumb->getCache($filename);

        return $urlizer->buildThumbUrl($basename);
    }