WhatsApp image message: JPEG or PNG, 5 MB, 1024-character caption
WhatsApp Cloud API image messages take 8-bit RGB or RGBA JPEG or PNG up to 5 MB, with a caption up to 1024 characters. Make a compliant file with Sume Images.

An image message on the WhatsApp Cloud API accepts JPEG or PNG only, 8-bit RGB or RGBA, up to 5 MB, with a caption of at most 1024 characters. Meta recommends sending by uploaded media id instead of a link. Sume Images can output both formats; check the byte size before you upload.
What are the image rules?
They come from Meta's image message page and its media reference. A request with an invalid or expired media id, or an unsupported image type, returns an error response instead of a message id.
| Item | Rule |
|---|---|
| Formats | JPEG, PNG |
| Color | 8-bit, RGB or RGBA |
| Max size | 5 MB |
| Caption | 1024 characters |
| Delivery | media id (recommended) or link |
How do I make a compliant file?
Request jpeg for photos and png for flat graphics. WebP is not accepted for image messages, though it is for stickers, so avoid webp here. A 1:1 or 4:5 ratio reads well in chat; Meta states no ratio rule in the pages read.
import json, os, urllib.request
body = {
"model": "bytedance-seed/seedream-4.5",
"prompt": "product photo of a canvas tote on a plain backdrop",
"aspect_ratio": "4:5",
"output_format": "jpeg"
}
req = urllib.request.Request(
"https://api.sume.com/v1/images",
data=json.dumps(body).encode(),
headers={
"Authorization": "Bearer " + os.environ["SUME_API_KEY"],
"Content-Type": "application/json",
},
method="POST",
)
print(urllib.request.urlopen(req).read().decode())Which delivery method should I use?
Upload once and send by media id. Meta's media reference says API uploads persist 30 days and media URLs expire after 5 minutes, which the related post covers. A hosted link is possible but not recommended.
What should I verify?
Check Meta's current pages before launch. The images guide covers Sume.
Sources
Related posts
More in Integrations
- WhatsApp webhook media IDs expire in 7 days: download and store
WhatsApp webhook media IDs expire after 7 days and media URLs after 5 minutes. Download inbound media promptly, then import it into Sume to edit it.
- Windmill webhook token in the URL: calling it from a Sume job
Windmill prefers a bearer header, but Sume's webhook_url is just a URL, so the token must ride in the query string. How to scope it and still trust the result.
- X API made_with_ai: disclose AI media when you create a post
The X API v2 create-post body has a made_with_ai boolean to disclose AI-generated media. Where it sits, what it needs, and how to prep the clip with Sume first.
- X API media metadata: alt text up to 1000 characters for AI images
X's media metadata endpoint takes alt_text.text up to 1000 characters. Write alt text for generated images and size the image with the Sume images API first.
Written by Sume