Skip to content

WordPress - Upload Media

This module allows uploading files to the WordPress media library from a public URL. Supports images, videos, PDF, and other formats. The file is downloaded from the provided URL and automatically uploaded to WordPress.

FieldDescriptionExample
urlWordPress site base URLhttps://my-site.com
usernameWordPress usernameadmin
application_passwordApplication password generated in WordPressxxxx xxxx xxxx xxxx
FieldTypeRequiredDescription
credentials_idcredentialsYesWordPress credential
file_urltextYesPublic URL of the file to upload
titletextNoFile title in the library
alt_texttextNoAlternative text (SEO/accessibility)
captiontextNoCaption or photo description
descriptiontextareaNoDetailed description
{
"success": true,
"media_id": 789,
"media_url": "https://misitio.com/wp-content/uploads/2025/01/imagen.jpg",
"media": { "id": 789, "title": { "rendered": "Mi Imagen" }, "source_url": "..." },
"message": "File uploaded successfully"
}
{
"file_url": "https://ejemplo.com/imagen.jpg",
"title": "Main Banner",
"alt_text": "Main page banner with promotion"
}
{
"file_url": "https://ejemplo.com/documento.pdf",
"title": "2024 Catalog",
"description": "Updated product catalog"
}
  • The file is downloaded from the provided URL and uploaded to WordPress.
  • Supported formats: JPG, PNG, GIF, PDF, MP4, etc. (depends on WordPress configuration).
  • The returned media_id can be used as featured_media in the Create/Update Post nodes.
  • The file URL must be public and accessible from the server.
  • WordpressCreatePost - Create post with the uploaded image as featured
  • WordpressCreatePage - Create page with the uploaded image as featured
  • WordpressUpdatePost - Update post featured image
  • WordpressGetMedia - Query existing files in the library