Upload media
wp_upload_mediaAdd a file to the Media Library, either from a public URL that WordPress downloads or from base64 content with a filename. Optional title, description and alt text.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| alt | No | ||
| url | No | URL to download the file from. Use this OR base64/filename. | |
| title | No | ||
| base64 | No | Base64-encoded file content. Must be used together with filename. | |
| filename | No | Filename with extension (e.g. photo.jpg). Required when using base64. | |
| description | No |