Mastodon: GIF uploads fail with "file size too big" even if they are only 1 MB

Created on 26 Apr 2017  ·  9Comments  ·  Source: tootsuite/mastodon

I had trouble posting this GIF:


GIF

doodle007

Even though it is only 1 MB, it gave me an error that the file size was too big on upload. To work around this, I ran the GIF through the gifsicle -O3 lossless optimizer, which resulted in this GIF, which does upload fine.


GIF

doodle007-o3


You'll notice that the file size is barely different, but it made the upload to Mastodon work. Maybe that could be a first step in any GIF upload? It's a pain to have to do it manually, especially when I'm on a mobile phone.

Note: I'm not the only user to have this issue. See this thread.


  • [x] I searched or browsed the repo’s other issues to ensure this is not a duplicate.
  • [x] This bug happens on a tagged release - 1.2.2 - and not on master (If you're a user, don't worry about this).
bug

All 9 comments

Thanks for the issue, strange indeed. (Note: I've edited your issue to hide the GIFs behind a <details> tag by default.)

I see the same thing on my instance: I get told that uploads max be only 8MB even if the gif is much smaller. It seems to work starting at some very small size instead.

It looks like the first GIF image is 1077441 bytes, just a bit more than the 1.megabytes = 1048576 bytes cap.

$ wget https://cloud.githubusercontent.com/assets/247555/25416621/909b6d1a-29f3-11e7-9a68-144d42ec5f19.gif
[...]
[scrubbed] ‘909b6d1a-29f3-11e7-9a68-144d42ec5f19.gif’ saved [1077441/1077441]

Is there a repro for the 8MB case?

I just uploaded a 1.8MB gif to a vanilla instance without issues, so I can't reproduce this. Maybe it's been fixed?

Looks that way, yes, can confirm large gif upload is working.

Hey, I just tried to update my header with a 1.8MB one, still an issue.

EDIT : the gif https://framapic.org/hcFi4LyB7Y5J/bzj6Ifzov1zU.gif

Are you able to upload it to a post? (Maybe it's just headers somehow?)

I can post it as a toot, no problem with that.
AFAIK, GIF headers are NOT converted to mp4, and the max file size is 2MB.

I see! Thank you for explaining. :)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Lewiscowles1986 picture Lewiscowles1986  ·  3Comments

cwebber picture cwebber  ·  3Comments

ghost picture ghost  ·  3Comments

marrus-sh picture marrus-sh  ·  3Comments

KellerFuchs picture KellerFuchs  ·  3Comments