我如何将图像下载到我的wordpress媒体库中并获得thumbnail_id,我已经尝试了以下代码
$res = $client->request('GET', $url);
$html = ''.$res->getBody();
$crawler = new Crawler($html);
$manga_cover = $crawler->filter('.cover')->filter('img')->attr('src');
$cover_url = 'https://'.$manga_cover;
// image url
print_r($cover_url);