Accepted Content Types for Media
This document outlines the accepted media content types and size limits for sending media messages through Twilio's Programmable Messaging API using MMS, RCS, and WhatsApp channels.
To send a media message, you must include the MediaUrl
parameter when making a request to the Twilio Programmable SMS API. Twilio checks the Content-Type
header at the provided MediaUrl
to validate the content type of the media file. If the Content-Type
header doesn't match that of the media file, Twilio will reject the request.
When you send an outbound message, the total message size must be under the maximum size limit for the channel. An API request with media or a collection of media larger than the size limit will fail with an error.
- For a media message, the maximum size limit is 5 MB.
- For an RCS media message, the maximum size limit is 16 MB. When sending an RCS message that requires fallback to MMS, message sizes exceeding the MMS limit of 5 MB will be rejected.
- For a WhatsApp media message, the maximum size limit is 16 MB.
To make sure users see the correct file name for a media attachment, include the Content-Disposition
header in response to a media fetch request.
Content-Disposition: inline; filename="<expected filename>.<extension>"
- Don't use spaces.
- Keep file name to 20 characters or less.
- Avoid using most special characters such as
~ ! @ # $ % ^ & * ( ) [ ] { }
.
Warning
Carrier-specific MMS message size limitations for non-image files are documented in this article.
MIME type category | MIME type | MMS support | RCS support | WhatsApp support | Can be combined with text via |
---|---|---|---|---|---|
Images | image/jpeg | Yes | Yes | Yes | MMS, RCS, WhatsApp |
image/jpg | Yes | Yes | Yes | MMS, RCS, WhatsApp | |
image/gif | Yes | Yes | Yes | MMS, RCS, WhatsApp | |
image/png | Yes | Yes | Yes | MMS, RCS, WhatsApp | |
image/heic | Yes | No | Yes | MMS, WhatsApp | |
image/heif | Yes | No | Yes | MMS, WhatsApp | |
image/tiff | Yes | No | Yes | MMS, WhatsApp | |
image/bmp | Yes | No | Yes | MMS, WhatsApp | |
image/webp The image/webp MIME type is only used for WhatsApp stickers, which have additional requirements. See WhatsApp FAQ for details. | No | No | Yes | ||
Video | video/mpeg4 | Yes | Yes | Yes | MMS, RCS, WhatsApp |
video/mp4 | Yes | Yes | Yes | MMS, RCS, WhatsApp | |
video/mpeg | Yes | Yes | Yes | MMS, RCS, WhatsApp | |
video/webm | Yes | Yes | Yes | MMS, RCS, WhatsApp | |
video/quicktime | Yes | No | Yes | MMS, WhatsApp | |
video/3gpp | Yes | No | Yes | MMS, WhatsApp | |
video/3gpp2 | Yes | No | Yes | MMS, WhatsApp | |
video/3gpp-tt | Yes | No | Yes | MMS, WhatsApp | |
video/H261 | Yes | No | Yes | MMS, WhatsApp | |
video/H263 | Yes | Yes | Yes | MMS, RCS, WhatsApp | |
video/H263-1998 | Yes | No | Yes | MMS, WhatsApp | |
video/H263-2000 | Yes | No | Yes | MMS, WhatsApp | |
video/H264 | Yes | No | Yes | MMS, WhatsApp | |
video/H265 | Yes | No | Yes | MMS, WhatsApp | |
Audio | audio/ogg | Yes | Yes | Yes | MMS, WhatsApp |
audio/mpeg | Yes | Yes | Yes | MMS, WhatsApp | |
audio/mp4 | Yes | Yes | Yes | MMS, WhatsApp | |
audio/mp3 | Yes | Yes | Yes | MMS, WhatsApp | |
audio/3gpp | Yes | Yes | Yes | MMS, WhatsApp | |
audio/3gpp2 | Yes | No | Yes | MMS, WhatsApp | |
audio/basic | Yes | No | Yes | MMS, WhatsApp | |
audio/L24 | Yes | No | Yes | MMS, WhatsApp | |
audio/vnd.rn-realaudio | Yes | No | Yes | MMS, WhatsApp | |
audio/vnd.wave | Yes | No | Yes | MMS, WhatsApp | |
audio/ac3 | Yes | No | Yes | MMS, WhatsApp | |
audio/webm | Yes | No | Yes | MMS, WhatsApp | |
audio/amr-nb | Yes | No | Yes | MMS, WhatsApp | |
audio/amr | Yes | No | Yes | MMS, WhatsApp | |
Text | text/vcard | Yes | No | Yes | MMS, WhatsApp |
text/x-vcard | Yes | No | Yes | MMS, WhatsApp | |
text/directory | Yes | No | Yes | MMS, WhatsApp | |
text/csv | Yes | No | Yes | MMS, WhatsApp | |
text/richtext | Yes | No | Yes | MMS, WhatsApp | |
text/rtf | Yes | No | Yes | MMS, WhatsApp | |
text/calendar | Yes | No | Yes | MMS, WhatsApp | |
Application | application/pdf | Yes | Yes | Yes | MMS, WhatsApp |
application/vnd.apple.pkpass | Yes | No | Yes | ||
application/vcard | Yes | No | Yes | ||
application/msword | No | No | Yes | ||
application/vnd.ms-excel | No | No | Yes | ||
application/vnd.ms-powerpoint | No | No | Yes | ||
application/vnd.openxmlformats-officedocument.presentationml.presentation | No | No | Yes | ||
application/vnd.openxmlformats-officedocument.spreadsheetml.sheet | No | No | Yes | ||
application/vnd.openxmlformats-officedocument.wordprocessingml.document | No | No | Yes |