WhatsApp· 5 min read

WhatsApp media messages: supported types and size limits


On the WhatsApp Cloud API, images are capped at 5 MB, audio and video at 16 MB, and documents at 100 MB. Stickers are WebP files of 100 KB when static and 500 KB when animated. Static WebP also works as an image, up to 5 MB. Each type accepts a short list of MIME types. A file outside the list or over the limit makes the send request fail with an error instead of a message ID. The full table is below, followed by the encoding rules that trip up files under the size limit.

Supported types and maximum sizes

This is Meta’s table from the Media guide, accessed 2026-11-02. Check the page again before you hard-code a limit.

Message type Extension MIME type Max size
Audio .aac audio/aac 16 MB
Audio .amr audio/amr 16 MB
Audio .mp3 audio/mpeg 16 MB
Audio .m4a audio/mp4 16 MB
Audio .ogg audio/ogg (OPUS codec only, mono input only) 16 MB
Document .txt text/plain 100 MB
Document .xls, .xlsx application/vnd.ms-excel, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet 100 MB
Document .doc, .docx application/msword, application/vnd.openxmlformats-officedocument.wordprocessingml.document 100 MB
Document .ppt, .pptx application/vnd.ms-powerpoint, application/vnd.openxmlformats-officedocument.presentationml.presentation 100 MB
Document .pdf application/pdf 100 MB
Image .jpeg image/jpeg 5 MB
Image .png image/png 5 MB
Image .webp (static only) image/webp 5 MB
Sticker (animated) .webp image/webp 500 KB
Sticker (static) .webp image/webp 100 KB
Video .3gp video/3gpp 16 MB
Video .mp4 video/mp4 16 MB

Documents outside this list can still go through. Meta’s document page says “Other file types may be sent via the API, but they are not supported and may not be handled as expected” (document messages). A GIF is not on the image list. Static WebP is accepted in image messages and “is transcoded to JPEG”; “Animated WebP images, files that cannot be decoded as valid WebP, and images over 4,096 pixels on an edge are rejected” (Media guide, accessed 2026-11-24).

Rules beyond file size

Images “must be 8-bit, RGB or RGBA” (Media guide). By that rule a 16-bit PNG is out, however small the file.

Video accepts only the H.264 video codec and the AAC audio codec, with one audio stream or none. Meta adds that Android WhatsApp clients do not support H.264 “High” profile with B-frames. It recommends Main profile without B-frames, or Baseline, with the moov box placed before the mdat box (Media guide). With ffmpeg:

ffmpeg -i input.mov -c:v libx264 -profile:v main -bf 0 -c:a aac -movflags +faststart output.mp4

Voice messages need an .ogg file encoded with OPUS. Send it with "voice": true in the audio object. The play icon appears only when the file is 512 KB or smaller; above that the client shows a download icon instead (audio messages). Meta’s table also requires mono input:

ffmpeg -i input.m4a -ac 1 -c:a libopus output.ogg

Meta names a mismatched MIME type as a common error (Media guide). Error 131053 reads “Unable to upload the media used in the message” (error codes). Meta suggests checking the real type from the command line with file -I your-file.png. A JPEG saved with a .png name is that mismatch.

Every media message takes either an id or a link. The id comes from uploading the file to POST /PHONE_NUMBER_ID/media. The link is a URL on your own public server, and Meta marks it “not recommended”, adding that for better performance you should upload instead (image messages). Meta’s upload request:

curl 'https://graph.facebook.com/API_VERSION/PHONE_NUMBER_ID/media' \
  -H 'Authorization: Bearer ACCESS_TOKEN' \
  -F 'messaging_product=whatsapp' \
  -F 'file=@/path/to/invoice.pdf;type=application/pdf'

The response is {"id": "<MEDIA_ID>"}. Uploaded files “persist for 30 days, unless they are deleted earlier”, and media IDs returned by the API expire after 30 days (Media guide). For a file you send to many customers, such as a catalog PDF, upload it once and reuse the ID until it expires. Note the type= part of the -F flag. It sets the MIME type Meta checks against the table.

Two more lifetimes matter when you reuse media. To remove an upload before its 30 days are up, send DELETE /MEDIA_ID, which returns {"success": true}. Media IDs that arrive in inbound webhooks last 7 days, not 30 (Media guide). Forwarding a customer’s photo to a colleague a week later needs your own copy of the file, uploaded again.

Captions and file names

Image, video and document messages take an optional caption of up to 1,024 characters. Document messages also take a filename, and the WhatsApp client picks its file icon from the extension (document messages; video messages). Audio and sticker requests have no caption field in Meta’s syntax. Send a text message after them if the file needs context.

What happens over the limit

A send fails when the media ID “is invalid or has expired”, the format is unsupported, or the file is over the limit (image messages). You get an error response and no message ID. Nothing reaches the customer. Fix the file before you send again, because the same file fails the same way.

Inbound has its own ceiling of 100MB for any media message on the Cloud API. When a customer sends something larger, you receive a webhook with error code 131052 and a title that starts “Media file size too big” (Media guide). Meta suggests replying with a warning, since you will never get the file. Downloading inbound media that did fit is covered in Download WhatsApp media before the URL expires.

Check files before you send

This check runs on the system python3 with the standard library only. It applies the table above by extension and size. Meta does not say whether its MB means 1,000,000 or 1,048,576 bytes, so the script uses the smaller figure.

import os
import sys

MB = 1_000_000  # stricter reading; Meta does not define MB
LIMITS = {
    ".aac": ("audio", 16 * MB), ".amr": ("audio", 16 * MB),
    ".mp3": ("audio", 16 * MB), ".m4a": ("audio", 16 * MB),
    ".ogg": ("audio", 16 * MB),
    ".txt": ("document", 100 * MB), ".pdf": ("document", 100 * MB),
    ".xls": ("document", 100 * MB), ".xlsx": ("document", 100 * MB),
    ".doc": ("document", 100 * MB), ".docx": ("document", 100 * MB),
    ".ppt": ("document", 100 * MB), ".pptx": ("document", 100 * MB),
    ".jpeg": ("image", 5 * MB), ".jpg": ("image", 5 * MB),  # same image/jpeg type
    ".png": ("image", 5 * MB),
    ".webp": ("sticker", 500_000),  # image (static, 5 MB) or sticker (100 KB static / 500 KB animated); decide by intent
    ".3gp": ("video", 16 * MB), ".mp4": ("video", 16 * MB),
}


def check(path):
    ext = os.path.splitext(path)[1].lower()
    if ext not in LIMITS:
        return f"{path}: {ext or 'no extension'} is not in Meta's supported list"
    kind, limit = LIMITS[ext]
    size = os.path.getsize(path)
    if size > limit:
        return f"{path}: {size} bytes is over the {limit}-byte {kind} limit"
    return f"{path}: ok as {kind}, {size} bytes"


for p in sys.argv[1:]:
    print(check(p))

Run it as python3 check_media.py invoice.pdf promo.mp4. It does not inspect codecs, so pair it with file -I and, for video, ffprobe.

This table belongs to the Cloud API. On a QR connection your provider sets and documents the limits. QR connection vs Meta’s official API sets out the other differences.

Z-API Omni team