public static function createFromBase64(Url $url)
    {
        $pieces = explode(';', $url->getContent(), 2);

        if ((count($pieces) !== 2) || (strpos($pieces[0], 'image/') === false) || (strpos($pieces[1], 'base64,') !== 0)) {
            return false;
        }

        if (($info = @getimagesizefromstring(base64_decode(substr($pieces[1], 7)))) !== false) {
            return new self(
                $url,
                $url,
                200,
                $info['mime'],
                [$info[0], $info[1]],
                [],
                []
            );
        }
    }