GIFs size limit 3Mb or 5Mb?



there is a passage on the Twitter documentation that confuse me about the maximum size allowed for GIFs.
The documentation says that in general the size limit is 5Mb but in some conditions it’s less. For example, when the image is attached to a tweet the size limit is 3Mb.
So, first of all, I don’t know how an image can be used without attaching it to a tweet, then my confusion.

Making things practical, I’m doing this:

  • using /media/upload endpoint to upload a GIFs
  • using /status/update and passing the id of the GIFs to the media id parameter of this endpoint

In this case, what it’s the GIFs maximum size ?



Hi Gianluca, the quick answer to your question about maximum GIF file size is 3MB.

Glad to explain this a bit further. The media/upload endpoint is used to upload media to our servers independently of how it will eventually be used and is always a 5MB file size limit.

Further limits apply in how your uploaded media is used. As you mentioned, one way is to attach it to a Tweet and that limit (for images including GIFs) is 3MB. If you were using the media upload for your profile image, the limit is 700KB. You can even use the media/upload endpoint to update your profile header image.

Hopefully that helps to explain other uses of the endpoint and why other limits exist.


It looks like the GIF size limit has been increased to 15MB (“Photos can be up to 5MB; animated GIFs can be up to 5MB on mobile, and up to 15MB on web”).

How, if at all, does this affect the GIF size limit when uploading via the API? Is it now effectively 5MB, not 3MB?