Add Features to Wordpress Node

At the moment the WordPress node has the following options to POST data via the API.
image

but I can’t see a way to “Upload Image to Media Library” as an option, can this be added?

REST API Endpoint is /wp-json/wp/v2/media

I have managed to do it via a HTTP Node instead

1 Like

Would you mind sharing the settings of that node?

Sure when I get home will get info

2 Likes
{
  "nodes": [
    {
      "parameters": {
        "authentication": "basicAuth",
        "requestMethod": "POST",
        "url": "https[:]//www[.]xxxxxxxxxxxxxxxxx[.]com/wp-json/wp/v2/media",
        "responseFormat": "file",
        "jsonParameters": true,
        "options": {
          "bodyContentType": "multipart-form-data",
          "bodyContentCustomMimeType": "image/png"
        },
        "sendBinaryData": true,
        "headerParametersJson": "{ \"User-Agent\": \"n8n\" }"
      },
      "name": "WordPress Upload Media",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 1,
      "position": [
        3370,
        -170
      ],
      "executeOnce": false,
      "credentials": {
        "httpBasicAuth": "YOUR CREDS SELECTED HERE"
      }
    }
  ],
  "connections": {}
}

1 Like

Thanks I really appreciate it!

1 Like

you’re welcome. I had to do it like this as I wasn’t getting the functionality I needed from the official node.

2 Likes