An error occurred while posting a particular image



An error occurred while posting tweet with a particular image (all other tested images published successfully).
Media has been successfully loaded on Twitter, but error occur on publish tweet with this image: Twitter response with status 500 and empty message.
Tweet contains image (PNG, 1600x1066px, 594KB).
Media ID on Twitter side: 976416133711650818
Please, help up to understand the causes of this error.


I’ve been unable to reproduce this, posting the image using our large video upload sample. What is your code doing?


Hi Andy,
yes, today this small image works OK, but a bigger one still fails:

We use Java to call Twitter API, but I’ve used as you suggested and got the following result:

Media ID: 976751140795797504
2866113 of 2866113 bytes uploaded
Upload chunks complete.
{u’media_id’: 976751140795797504, u’image’: {u’image_type’: u’image/png’, u’h’: 1283, u’w’: 1925}, u’media_id_string’: u’976751140795797504’, u’expires_after_secs’: 86400, u’media_key’: u’3_976751140795797504’, u’size’: 2866113}
{u’errors’: [{u’message’: u’Internal error’, u’code’: 131}]}

Please note that I use the following parameters for INIT command:

request_data = {
‘command’: ‘INIT’,
‘media_type’: ‘image/png’,
‘total_bytes’: self.total_bytes,
‘media_category’: ‘tweet_image’


Hey all,

Here at HubSpot we’ve been running into this for a while, too. Chunked or unchunked. This also occurs when I try to upload a big, 2.9MB PNG image to the Twitter desktop app, which makes me think it’s a general system issue and not an API issue.

Here’s a sample image that fails:

I was able to fix this by resizing the PNG down to around 2.4MB or 2.5MB by an image library.


We’ve been experiencing this for months and I could probably provide additional examples if it helps.


And in fact, now this picture is published successfully, but others (larger ones as mentioned by @ilia_at_smrsh ) are not.


Just did a test and still seeing the same error for the image even when posting directly to on desktop Chrome.