Learn how to upload images and files to a Wix site's Media Manager using the REST API.
The Wix Media Manager stores all media files for a site. When you need to use images or files in other Wix APIs, you should first upload them to the Media Manager to get a reliable wixstatic.com URL.
Key Points:
url (wixstatic.com) that works reliably in other APIsThe simplest way to add media is to import it from an external URL. Wix will download and store the file.
| Parameter | Required | Description |
|---|---|---|
url | Yes | The external URL of the file to import |
mimeType | Recommended | MIME type (e.g., image/jpeg, image/png). If omitted, Wix tries to detect it |
displayName | No | Display name in Media Manager. Include extension (e.g., My Image.jpg) |
parentFolderId | No | Folder ID to store the file. Defaults to media-root |
| Field | Description |
|---|---|
id | Media ID |
url | The wixstatic.com URL - use this in other APIs |
operationStatus | PENDING → READY when processed, or FAILED if import failed |
Can I Use the URL Immediately?
In most cases, yes. The returned wixstatic.com URL typically works immediately for basic use cases like adding to products or blog posts.
Wait for READY when:
Practical approach: Try using the URL immediately. If it fails, poll until operationStatus: "READY".
After importing, the file goes through async processing. For guaranteed consistency, verify operationStatus: "READY" before using the file.
Use this endpoint to check the status of a specific file:
Example:
If you need to find files without knowing the ID:
| Status | Meaning |
|---|---|
PENDING | Still processing - wait before using |
READY | File is ready to use |
FAILED | Import failed |
Note: Wix automatically generates labels (tags) for images using AI.
If you need to upload files from a local device (not from a URL), use the two-step upload process:
Note: For files larger than 10MB, use the Resumable Upload URL API instead.
Problem: The file shows operationStatus: "FAILED" after import.
Causes:
Solution: Use image sources that allow hotlinking:
images.unsplash.com)images.pexels.com)Problem: File stays in PENDING status for a long time.
Solution:
| Step | Action | Result |
|---|---|---|
| 1 | Call Import File API with external URL | Get file id and url with status PENDING |
| 2 | Poll List Files API | Wait for operationStatus: "READY" |
| 3 | Use in other APIs | Use the url field (wixstatic.com URL) |