Guides
Media Uploads
How to attach images and videos to posts via the API.
Overview
FeedHorizon supports attaching media (images and videos) to posts. Media is stored in Supabase Storage and referenced via URLs.
Supported formats
| Type | Formats | Max size |
|---|---|---|
| Images | JPEG, PNG, GIF, WebP | 5 GB |
| Videos | MP4, MOV, AVI, WebM | 5 GB |
| Documents | PDF (LinkedIn only) | 100 MB |
Attaching media to posts
When creating a post via the API, include media URLs in the mediaUrls field:
curl -X POST https://app.feedhorizon.dev/api/v1/posts \
-H "Authorization: Bearer fh_YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"content": "Check out this image!",
"platforms": ["linkedin"],
"profileId": "YOUR_PROFILE_ID",
"mediaUrls": [
"https://example.com/photo.jpg"
]
}'Media in responses
Media attached to a post is returned in the media array:
{
"data": {
"id": "clxyz...",
"content": "Check out this image!",
"media": [
{
"id": "clmedia...",
"url": "https://your-bucket.supabase.co/storage/v1/object/public/media/photo.jpg",
"type": "image/jpeg",
"filename": "photo.jpg",
"sizeBytes": 245760,
"sortOrder": 0
}
]
}
}Platform-specific limits
Each platform has its own media constraints:
| Platform | Max images | Max videos | Notes |
|---|---|---|---|
| 9 | 1 | Cannot mix images and videos |
Tips
- Upload media to a publicly accessible URL before referencing it in a post
- Media URLs must be HTTPS
- The dashboard provides a drag-and-drop upload experience that handles storage automatically