Skip to contentSkip to navigationSkip to topbar
On this page

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(link takes you to an external page) of the media file. If the Content-Type header doesn't match that of the media file, Twilio will reject the request.


Media size limits

media-size-limits page anchor

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.

Including the Content-Disposition header

including-the-content-disposition-header page anchor

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>"

Media file name guidelines

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

Warning

Please be aware of carrier-specific MMS message size limitations for non-image files, which we have documented in this article(link takes you to an external page).

MIME type categoryMIME typeMMS supportRCS supportWhatsApp supportCan be combined with text via
Imagesimage/jpegYesYesYesMMS, RCS, WhatsApp
image/jpgYesYesYesMMS, RCS, WhatsApp
image/gifYesYesYesMMS, RCS, WhatsApp
image/pngYesYesYesMMS, RCS, WhatsApp
image/heicYesNoYesMMS, WhatsApp
image/heifYesNoYesMMS, WhatsApp
image/tiffYesNoYesMMS, WhatsApp
image/bmpYesNoYesMMS, WhatsApp
image/webp

The image/webp MIME type is only used for WhatsApp stickers, which have additional requirements. See WhatsApp FAQ for details(link takes you to an external page).
NoNoYesWhatsApp
Videovideo/mpeg4YesYesYesMMS, RCS, WhatsApp
video/mp4YesYesYesMMS, RCS, WhatsApp
video/mpegYesYesYesMMS, RCS, WhatsApp
video/webmYesYesYesMMS, RCS, WhatsApp
video/quicktimeYesNoYesMMS, WhatsApp
video/3gppYesNoYesMMS, WhatsApp
video/3gpp2YesNoYesMMS, WhatsApp
video/3gpp-ttYesNoYesMMS, WhatsApp
video/H261YesNoYesMMS, WhatsApp
video/H263YesYesYesMMS, RCS, WhatsApp
video/H263-1998YesNoYesMMS, WhatsApp
video/H263-2000YesNoYesMMS, WhatsApp
video/H264YesNoYesMMS, WhatsApp
video/H265YesNoYesMMS, WhatsApp
Audioaudio/oggYesYesYesMMS, WhatsApp
audio/mpegYesYesYesMMS, WhatsApp
audio/mp4YesYesYesMMS, WhatsApp
audio/mp3YesYesYesMMS, WhatsApp
audio/3gppYesYesYesMMS, WhatsApp
audio/3gpp2YesNoYesMMS, WhatsApp
audio/basicYesNoYesMMS, WhatsApp
audio/L24YesNoYesMMS, WhatsApp
audio/vnd.rn-realaudioYesNoYesMMS, WhatsApp
audio/vnd.waveYesNoYesMMS, WhatsApp
audio/ac3YesNoYesMMS, WhatsApp
audio/webmYesNoYesMMS, WhatsApp
audio/amr-nbYesNoYesMMS, WhatsApp
audio/amrYesNoYesMMS, WhatsApp
Texttext/vcardYesNoYesMMS, WhatsApp
text/x-vcardYesNoYesMMS, WhatsApp
text/directoryYesNoYesMMS, WhatsApp
text/csvYesNoYesMMS, WhatsApp
text/richtextYesNoYesMMS, WhatsApp
text/rtfYesNoYesMMS, WhatsApp
text/calendarYesNoYesMMS, WhatsApp
Applicationapplication/pdfYesYesYesMMS, WhatsApp
application/vnd.apple.pkpassYesNoYesWhatsApp
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

Need some help?

Terms of service

Copyright © 2024 Twilio Inc.