Tweet with gif media shows as having jpeg media



When uploading image via upload/media endpoint it returns external media id and among other image type which is image/gif.

Sample twurl:
twurl -H -X POST “/1.1/media/upload.json” --file “/path/to/media.gif” --file-field “media”

After that I create promoted tweet with that gif image:
twurl -H “/0/accounts/18ce545gvch/tweet” -d “account_id=18ce545gvch&as_user_id=132242064&media_ids=704275119653449728&status=Hello tweet” | json

And the problem is tweet is created with a jpg image (first frame of animated gif), instead of animated gif


Thanks for the inbound. Can you provide a link to the media so we can reproduce?


We tried many different gif images and all produced same result. Here is a sample one:


As a quick update, I ran this sequence of commands:

twurl -H -X POST "/1.1/media/upload.json" --file "giphy.gif" --file-field "media"

And then:

twurl "/1.1/statuses/update.json" -d "media_ids=704366833223086080&status=Sample Tweet with media_ids and twurl"

Some observations:

  • This actually worked, and posted a tweet with the animated Gif. Admittedly it’s the public API not the accounts API.
  • The return result of the second cal returns media_url as a jpg. This is because it is backward compatible with non-gif supported clients.
  • The extended_entities returned has the video information

I’ll work on the ads API, but can you supply the result you’re getting in the post, and the URL of the tweet so we can take a quick look in the UI?


As a final note, I did what you suggested with my account (and the same media) with this call:

twurl -H "/0/accounts/wawhv/tweet" -d "account_id=wawhvgvch&as_user_id=54256387&media_ids=704366833223086080&status=Hello tweet" | jq

And I see the animated image:

You should be able to see the tweet here:

If you want to find your tweet, you’ll need to log into the ads dashboard and go to Creatives -> Tweets:

closed #7

opened #8


You are right. It was a problem in our image processing software.

Thank you very much

closed #10