Media Toolswordpress_upload_media
Media Tools

wordpress_upload_media

Upload a media file (image, document, video) to WordPress from base64, URL, or a local file path.

wordpress_upload_media

Upload a media file (image, document, video) to WordPress. Supports base64 encoded files, file URLs, or file paths.

Parameters

ParameterTypeRequiredDescription
filestringYesFile content as base64 string, file URL to download, or file path
filenamestringYesFilename for the uploaded file
mimeTypestringNoMIME type (e.g., image/jpeg, image/png, application/pdf)
titlestringNoOptional title for the media item
altstringNoOptional alt text for images
captionstringNoOptional caption for the media item

Response

{
  "success": true,
  "id": 777,
  "sourceUrl": "https://example.com/wp-content/uploads/logo.png"
}

Example Prompts

  • "Upload this image and set the alt text to 'Respira logo'"
  • "Upload the PDF at this URL to my media library"
  • "Upload /path/to/file.png as 'hero.png'"

Notes

  • Always provide a descriptive alt text for images (accessibility + SEO)
  • Use mimeType when uploading from base64 or a file path to avoid mis-detection
Was this page helpful?
Built with Documentation.AI

Last updated Dec 15, 2025