Upload media
wp_media_uploadUpload a local file or sideload a remote URL into a WordPress media library, with optional title, alt text, and filename.
Instructions
Upload a local file to the media library. Provide path, or url to sideload a remote file.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | No | Remote URL to download then upload | |
| path | No | Local absolute path | |
| title | No | ||
| alt_text | No | ||
| filename | No |