upload_image
Upload images to img-src.io from local files, URLs, or base64 data to generate CDN URLs for use in applications and websites.
Instructions
Upload an image to img-src.io. IMPORTANT: Always prefer 'file_path' (absolute path like /Users/name/image.png) over base64 'data' to avoid context length limits. Use 'url' for web images. Only use 'data' as last resort for small images. Supports JPEG, PNG, WebP, GIF, AVIF, HEIC, and more. Max 5MB. Returns CDN URLs for the uploaded image.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file_path | No | PREFERRED: Absolute path to local image file (e.g., /Users/name/photo.png). Use this instead of base64 data. | |
| url | No | URL of image to download and upload (for web images) | |
| data | No | Base64-encoded image data. AVOID: causes context length issues. Use file_path instead. | |
| mimeType | No | MIME type (required only when using data, e.g., image/png) | |
| target_path | No | Optional: Folder path to store the image (e.g., 'photos/2024'). Filename is determined from source. |