docs/nodes/images.md
The WhatsApp channel runs on Baileys Web. This page covers media handling rules for send, gateway, and agent replies.
openclaw message send --media.openclaw message send --target <dest> --media <path-or-url> [--message <caption>]
--media <path-or-url> — attach media (image/audio/video/document); accepts local paths or URLs. Optional; caption can be empty for media-only sends.--gif-playback — treat video media as GIF playback (WhatsApp only).--force-document — send media as a document to avoid channel compression (Telegram, WhatsApp); applies to images, GIFs, and videos.--reply-to <id>, --thread-id <id>, --pin, --silent — delivery/threading options shared with text-only sends.--dry-run — print the resolved payload and skip sending.--json — print the result as JSON: { action, channel, dryRun, handledBy, messageId?, payload } (payload carries the channel-specific send result, including any media reference).channels.whatsapp.mediaMaxMb (default 50MB). Opaque images are recompressed to JPEG (default side ladder starts at 2048px, descending on repeated size misses); images with transparency are kept as PNG. If the source is already an acceptable JPEG/PNG/WebP within the size and side-length budget, the original bytes are preserved unchanged instead of being recompressed. Animated GIFs are never re-encoded, only size-checked..ogg/.opus, or audio/ogg/audio/opus), outbound audio is transcoded via ffmpeg to Opus/OGG (48kHz mono, 64kbps, capped at 20 minutes) before sending as a voice note (ptt: true).gifPlayback: true (CLI: --gif-playback) so mobile clients loop it inline.application/octet-stream, zip) never overrides a more specific extension mapping (for example XLSX vs ZIP).--message or reply.text; empty caption is allowed.↩️/✅; verbose includes size and source path/URL.getReplyFromConfig returns a reply payload (or array of payloads) with text?, mediaUrl?, and mediaUrls? among other fields.openclaw message send.{{MediaUrl}} — pseudo-URL for the inbound media.{{MediaPath}} — local temp path written before running the command.MediaPath/MediaUrl are rewritten to a sandbox-relative path like media/inbound/<filename>.tools.media.* or shared tools.media.models) runs before templating and can insert [Image], [Audio], and [Video] blocks into Body.
{{Transcript}} and uses the transcript for command parsing so slash commands still work.[Image] summary block and passes the original image to the model instead.tools.media.<capability>.attachments to process multiple attachments.Outbound send caps (WhatsApp web send)
channels.whatsapp.mediaMaxMb (default 50MB) after optimization.mediaMaxMb when sending through WhatsApp).mediaMaxMb when sending through WhatsApp).Media understanding caps (transcription/description)
tools.media.image.maxBytes).tools.media.audio.maxBytes).tools.media.video.maxBytes).