Skip to contentSkip to navigationSkip to topbar
On this page

Accepted content types for media


This document describes the MIME types and size limits Twilio accepts when you send media through the Programmable Messaging API over MMS, RCS, or WhatsApp.

To send a media message, include the MediaUrl parameter in your request to the Programmable Messaging API. Twilio issues GET and HEAD requests to the MediaUrl to validate the file's Content-Type header. If the header value does not match the actual media type, Twilio rejects the request.


Media size limits

media-size-limits page anchor

When you send an outbound message, the combined size of the message and its media must stay below the channel's maximum limit. Twilio returns an error if any file—or the collection of files—exceeds that limit.

  • MMS: 5 MB
  • RCS: 16 MB
    If an RCS message falls back to MMS, Twilio rejects bodies larger than the MMS limit (5 MB).
  • WhatsApp: 16 MB

Include the Content-Disposition header

include-the-content-disposition-header page anchor

Add a Content-Disposition header so recipients see the correct file name:

Content-Disposition: inline; filename="<EXPECTED_FILENAME>.<EXTENSION>"

Media file-name guidelines

media-file-name-guidelines page anchor
  • Don't use spaces.
  • Keep file names to 20 characters or less.
  • Avoid most special characters, such as ~ ! @ # $ % ^ & * ( ) [ ] { }.
(warning)

Warning

MIME-type categoryMIME typeMMSRCSWhatsAppCan combine with text in
Imagesimage/jpegYesYesYesMMS, RCS, WhatsApp
image/jpgYesYesYesMMS, RCS, WhatsApp
image/gifYesYesYesMMS, RCS
image/pngYesYesYesMMS, RCS, WhatsApp
image/heicYesNoYesMMS
image/heifYesNoYesMMS
image/tiffYesNoYesMMS
image/bmpYesNoYesMMS
image/webp
The image/webp type is used only for WhatsApp stickers, which have additional requirements. See the WhatsApp FAQ(link takes you to an external page) for details.
NoNoYesWhatsApp
Videovideo/mpeg4YesYesYesMMS, RCS
video/mp4YesYesYesMMS, RCS, WhatsApp
video/mpegYesYesYesMMS, RCS
video/webmYesYesYesMMS, RCS
video/quicktimeYesNoYesMMS
video/3gppYesNoYesMMS
video/3gpp2YesNoYesMMS
video/3gpp-ttYesNoYesMMS
video/H261YesNoYesMMS
video/H263YesYesYesMMS, RCS
video/H263-1998YesNoYesMMS
video/H263-2000YesNoYesMMS
video/H264YesNoYesMMS
video/H265YesNoYesMMS
Audioaudio/oggYesYesYesMMS, WhatsApp
audio/mpegYesYesYesMMS, WhatsApp
audio/mp4YesYesYesMMS
audio/mp3YesYesYesMMS
audio/3gppYesYesYesMMS, WhatsApp
audio/3gpp2YesNoYesMMS
audio/basicYesNoYesMMS
audio/L24YesNoYesMMS
audio/vnd.rn-realaudioYesNoYesMMS
audio/vnd.waveYesNoYesMMS
audio/ac3YesNoYesMMS, WhatsApp
audio/webmYesNoYesMMS
audio/amr-nbYesNoYesMMS
audio/amrYesNoYesMMS, WhatsApp
Texttext/vcardYesNoYesMMS
text/x-vcardYesNoYesMMS, WhatsApp
text/directoryYesNoYesMMS
text/csvYesNoYesMMS
text/richtextYesNoYesMMS
text/rtfYesNoYesMMS
text/calendarYesNoYesMMS
Applicationapplication/pdfYesYesYesMMS, WhatsApp
application/vcardYesNoYesWhatsApp
application/mswordNoNoYesWhatsApp
application/vnd.ms-excelNoNoYesWhatsApp
application/vnd.ms-powerpointNoNoYesWhatsApp
application/vnd.openxmlformats-officedocument.presentationml.presentationNoNoYesWhatsApp
application/vnd.openxmlformats-officedocument.spreadsheetml.sheetNoNoYesWhatsApp
application/vnd.openxmlformats-officedocument.wordprocessingml.documentNoNoYesWhatsApp