wordpress-featured-image

n8n community node for uploading images to WordPress and setting as featured image

Package Information

Downloads: 39 weekly / 54 monthly
Latest Version: 1.0.2
Author: Tám Công Nghệ

Documentation

n8n-nodes-wordpress-featured-image

This is an n8n community node for uploading images to WordPress and setting them as featured images for posts.

n8n is a fair-code licensed workflow automation platform.

Features

  • Upload binary images to WordPress Media Library
  • Set uploaded images as featured images for posts
  • Support for image title and alt text (SEO)
  • Retry logic with exponential backoff
  • Detailed error handling and logging
  • Works with WordPress REST API and Application Passwords

Installation

Follow the installation guide in the n8n community nodes documentation.

npm install n8n-nodes-wordpress-featured-image

Credentials

You need to create WordPress API credentials:

  1. WordPress URL: Your WordPress site URL (e.g., https://yourdomain.com)
  2. Username: Your WordPress username
  3. Application Password: Create one in WordPress Admin → Users → Profile → Application Passwords

Node Usage

Parameters

  • Post ID (required): The ID of the WordPress post
  • Binary Property Name (default: "data"): Name of the binary property containing the image
  • Image Title (optional): Title for the image in Media Library
  • Image Alt Text (optional): Alt text for SEO
  • Max Retry Attempts (default: 2): Number of retry attempts (0-5)

Workflow Example

1. [Previous Node] → Generate or get image (binary data)
2. [WordPress Featured Image] → Upload to WordPress & set as featured image
3. [Success] → Post now has featured image

Output

The node outputs detailed information:

{
  "success": true,
  "postId": 123,
  "mediaId": 456,
  "featuredMediaUrl": "https://site.com/wp-content/uploads/image.jpg",
  "mediaTitle": "Image Title",
  "postTitle": "Post Title",
  "postUrl": "https://site.com/post-slug",
  "log": {
    "step1": "Image uploaded to Media Library",
    "step2": "Media metadata updated",
    "step3": "Featured image set for post"
  }
}

Compatibility

Tested with n8n version 1.0.0+

Resources

Version History

  • 1.0.0 - Initial release

License

MIT

Discussion