$client = new GuzzleHttp\Client();
            $response = $client->request('POST', $url . '/wp-json/wp/v2/media', [
                'multipart' => [
                    [
                        'name'     => 'file',
                        'contents' => $resimadres,
                        'filename' => basename($resimadres),
                ]
                ],

                'headers' => [
                    'Authorization' => 'Basic ' . base64_encode($username . ':' . $password),
                    'Content-Type' => 'multipart/form-data; boundary=' . $boundary,
                    'Content-Disposition' => 'form-data; filename=dare.jpg',
                ],

            ]);
Daha önce rest side upload error alırken multipart denediğimde bu hatayı aldım.
Alıntı
{"code":"rest_upload_no_data","message":"Veri sau011flanmadu0131.","data":{"status":400}}