Topic: [Feature/Implemented] Filesize limit for GIF files

Posted under Site Bug Reports & Feature Requests

Requested feature overview description.
If user is trying to upload gif that is exceeding 20 MB, upload gets prevented.

Why would it be useful?
post #840879 post #840941
GIF: 1280x720, 50 FPS, visual dithering, 65 MB
WebM: 1920x1080, 48 FPS, video compression (also visible on gif version), sound, 5 MB

post #843248
3 second loop that's also reversed that's 56 MB large. Taken from the 30 second long video.

post #841317 post #841347
GIF: 1920x1080, 10 FPS, 53 MB
WebM: 1920x1080, 24 FPS, 1 MB

These are just few of tons of examples, but I hope this can get my point across. This is actually really hard matter as there's no definite line and I don't want to sound like I'm telling everyone how to use the fileformat. I'm also not againts the gifs in general and with many things they are actually best thing to use at least right now.

However when it gets to this degrees, I'm almost certain there's at least some level of agreement that it's going too far. Gifs clearly cannot handle high frame rate HD quality content, so why are some are still trying to force that in? For those wanting the quality, video and flash formats do exsists, leaving main focus of gifs onto those who either do not care about quality or are using older/mobile devices to view the content. This means that for those users larger filesize will only start to become negative when certain point is passed.

One main benefit of gifs is the ability to share them easily or highlight certain parts from longer videos, but when the sizes get insanely large and they contain full minutes long video instead of that highlight, the benefit vanishes.

There are so many variables when it comes to gifs, so going by resolution, frame rate, artists official version, version using custom color palette, etc. at least start would be to do what other major sites have been doing for years: limit filesize.

Even sites like imgur actually convert gifs into webm and mp4 videos when they go over certain treshold. Twitter automatically converts every gif into mp4, major chat programs do this as well. e6 does have webm and flash support directly, so the reason to keep insanely large gifs especially if they are user generated becomes much less meaningful.

What part(s) of the site page(s) are affected?
New uploads uploaded onto site.

Updated by KiraNoot

The static server would say thank you for this. I don't understand super huge gifs either.

Updated by anonymous

I never really understood why people would want to use .gif files for <30 second videos over WebM. A part of me is starting to think that it's done intentionally in lieu of .mp4 and .webm files.

Updated by anonymous

Aanyi said:
I never really understood why people would want to use .gif files for <30 second videos over WebM. A part of me is starting to think that it's done intentionally in lieu of .mp4 and .webm files.

Commenters over at R34 constantly whinge about not being able to play WebM on their Iphones, even after being repeatedly given instructions on how to do it.

Updated by anonymous

Aanyi said:
I never really understood why people would want to use .gif files for <30 second videos over WebM. A part of me is starting to think that it's done intentionally in lieu of .mp4 and .webm files.

What BlueDingo said. As an iPhone user I have to use external apps to download, play, and sometimes delete, videos just to tag them. And if I want to view it again, I have to access said app and keep those on, using memory (which can be trivial) and time (less so). Albeit those are inconveniences, I would prefer to use flash 'cause I at least have a browser for that, or GIFs above all.

You can't get rid of something that's useful, no matter how obsolete or outdated it is.

Updated by anonymous

KiraNoot said:
No, just no. Let the format die.

Why?
Having less formats is good once things are settled. But this niche is pretty much still in limbo; there is APNG and WebP, both are trying to do approximately the same thing, neither have a decisive 'marketshare' yet, despite Google being behind one of them.

Albeit those are inconveniences, I would prefer to use flash 'cause I at least have a browser for that, or GIFs above all.

.. Is it possible to do like Imgur in reverse? Generate GIFs from sufficiently short WebMs, and provide these GIFs by default on mobile platforms.

Updated by anonymous

KiraNoot said:
No, just no. Let the format die.

It should really see a rise. APNG is a better format than GIF, not suffering from the restricted pallet.

savageorange said:
WebP

I forgot about that. I like APNG better, but only because I heard of it first. No idea how they compare, mechanically.

Edit: Remembered why I liked APNG more. My browser can't display WebP

Updated by anonymous

Furrin_Gok said:
It should really see a rise. APNG is a better format than GIF, not suffering from the restricted pallet.

I'm not sure that it is a *better* format than GIF. In particular, the fallback behaviour (PNG loader that doesn't understand APNG displays first frame of APNG as a static image) strikes me as dubious; things shouldn't "silently fail" like this. If they fail they should fail *obviously*.

Perhaps it should also be noted that the restricted palette in GIF is 256 colors per frame, not 256 colors per animation.

(https://en.wikipedia.org/wiki/GIF#True_color)

I forgot about that. I like APNG better, but only because I heard of it first. No idea how they compare, mechanically.

WebP is more closely fitted to this particular problem (supports lossy as well as lossless animation) but takes a little more CPU to decode. Compression rates of WebP have improved since that comparison was done IIRC

Edit: Remembered why I liked APNG more. My browser can't display WebP

Yeah, me too.
We used to have the exact same situation with GIFs, which is basically why I'm saying 'eh, wait and see'.

Updated by anonymous

savageorange said:
I'm not sure that it is a *better* format than GIF. In particular, the fallback behaviour (PNG loader that doesn't understand APNG displays first frame of APNG as a static image) strikes me as dubious; things shouldn't "silently fail" like this. If they fail they should fail *obviously*.

Actually, that failsafe is one of the things that makes the format better. Failsafes in general are a good thing.

Updated by anonymous

Furrin_Gok said:
What about APNGs?

Last one was uploaded two years ago and the extension is exactly the same with png image, so I don't personally see that as an issue, especially when I need to either have plugins or firefox to even see those. "the rise" I haven't seen much anywhere. I remember hearing about the APNG when I was still in school and it mostly seems like everyone wants to get rid of it asap and no programs seem to support it, even though I do like it more than gifs.

If WebP is at some point accepted as file format, it can also contain lossy and lossless, static and animated content as well, so it will be hard if someone starts uploading lossless animations with that. So in that sense it differs from APNG as by default PNG and APNG are lossless like savageorange said above.

Siral_Exan said:
What BlueDingo said. As an iPhone user I have to use external apps to download, play, and sometimes delete, videos just to tag them. And if I want to view it again, I have to access said app and keep those on, using memory (which can be trivial) and time (less so). Albeit those are inconveniences, I would prefer to use flash 'cause I at least have a browser for that, or GIFs above all.

You can't get rid of something that's useful, no matter how obsolete or outdated it is.

If your personal preference is to use apples mobile device to do this just for tagging, I would say at that point it becomes your personal problem.
And for flash browsers, what they do is they are running the flash on companys servers and stream it to you in video format. Similar to asking some friend playing the file on their computer and sending the video for you, but it's automated. I have no idea why they can't do the same with videos, because it would even be easier for them.

And this is one of the reasons I don't want to ban gifs because they are useful in situations like this. However like you said you are using PHONE, meaning you don't need to watch whole 30 second long video in HD and if you want to, you have the ability to click on parent post and download the whole video to watch it. We literally already have the system for this.

Also we do not use BMP or TIFF formats here either.

BlueDingo said:
Actually, that failsafe is one of the things that makes the format better. Failsafes in general are a good thing.

Check every single comment section under apng tag and tell me how this is better? If there was some dedicated static frame in the file which indicates it's not static image, then that failsafe would make sense, but you would need to insert the frame to be first one so it would also show up with animation on supported software.

Updated by anonymous

BlueDingo said:
Actually, that failsafe is one of the things that makes the format better. Failsafes in general are a good thing.

Bad failsafes are worse than no failsafe. The fallback content should either be strictly equivalent, or it should indicate clearly what the problem is. This is a well established standard of behaviour for the web.

I mean, I can sympathize with the thought process that concluded that the first frame was a suitable fallback. But in practice it turns out it simply isn't.

Updated by anonymous

Mario69 said:
Last one was uploaded two years ago and the extension is exactly the same with png image, so I don't personally see that as an issue, especially when I need to either have plugins or firefox to even see those. "the rise" I haven't seen much anywhere. I remember hearing about the APNG when I was still in school and it mostly seems like everyone wants to get rid of it asap and no programs seem to support it, even though I do like it more than gifs.

savageorange said:
Bad failsafes are worse than no failsafe. The fallback content should either be strictly equivalent, or it should indicate clearly what the problem is. This is a well established standard of behaviour for the web.

I mean, I can sympathize with the thought process that concluded that the first frame was a suitable fallback. But in practice it turns out it simply isn't.

Regardless, e621 does support APNG uploads, so if there's a limit on the permitted sizes, it should be included on APNGs.

Although, WebP doesn't seem to include any sort of error message, either. I just see the text, GenevaDrive.webp, which doesn't alert me that, hey, there's supposed to be an image here, not just a random string.

Updated by anonymous

savageorange said:
I mean, I can sympathize with the thought process that concluded that the first frame was a suitable fallback. But in practice it turns out it simply isn't.

post #108911

Updated by anonymous

savageorange said:
Bad failsafes are worse than no failsafe. The fallback content should either be strictly equivalent, or it should indicate clearly what the problem is. This is a well established standard of behaviour for the web.

I mean, I can sympathize with the thought process that concluded that the first frame was a suitable fallback. But in practice it turns out it simply isn't.

This failsafe is what makes me hate the format. It is invisible to most software, and if you don't want people to upload an animation somewhere, this failsafe design is actually an exploit. Having had to fix several sites that had animation injection vulnerabilities has soured me to the format. I don't want changing expectations on what can, and can not be animated when it comes to user content. That's a bad thing. I at least expect WebP to have animation capabilities, and I can test for it, and when it isn't supported, it fails loudly, and obviously.

Updated by anonymous

Furrin_Gok said:
It should really see a rise. APNG is a better format than GIF, not suffering from the restricted pallet.
I forgot about that. I like APNG better, but only because I heard of it first. No idea how they compare, mechanically.

Edit: Remembered why I liked APNG more. My browser can't display WebP

This test is actually rigged in favor of APNG. By using a 256 indexed color input, and outputting a 256 indexed color PNG(yes they exist.) they can guarantee that APNG will always win this competition. They gain a flat compression ratio advantage over GIF by using a newer compression algorithm, and are storing only slightly more data. The WebP examples lose because they undergo a color space conversion and are expanded into 24-32bit color. This is an important distinction that is never mentioned by the article. Given full color lossless input frames, this would not stack up as favorably for APNG or GIF. As a straight replacement for GIF, including color pallet restrictions, yup, APNG wins, but it misses the point of why people want to move away from GIF.

Updated by anonymous

Furrin_Gok said:
Regardless, e621 does support APNG uploads, so if there's a limit on the permitted sizes, it should be included on APNGs.

Although, WebP doesn't seem to include any sort of error message, either. I just see the text, GenevaDrive.webp, which doesn't alert me that, hey, there's supposed to be an image here, not just a random string.

I do agree with you, but my point is that unless you implement some extra code, regular png file is file.png and apng file is file.png. Also there's 13 apng files and like 16 000 animated gifs, so the problem isn't that apparent.

So it's not like e6 supports the apng files, but they just happen to use exactly the same file extension so they can get trough regardless. And if we do this without extra coding which I'm actually not sure if it's even possible, limiting apng files will also limit png files, which can be even up to 150 MB (holy fuck vader-san) and with those the quality is much appreciated as they are essentially ready for print. Meanwhile you don't want to put gif even onto dvd.

But if it can be done, sure! Who knows if that format still catches on.

Updated by anonymous

Furrin_Gok said:
It should really see a rise. APNG is a better format than GIF, not suffering from the restricted pallet.
I forgot about that. I like APNG better, but only because I heard of it first. No idea how they compare, mechanically.

Edit: Remembered why I liked APNG more. My browser can't display WebP

APNG is a frankenstein creation created by the Mozilla foundation. Of course Mozilla will support their "fancy" format and not bother with the format of their nemesis.
Also, APNG is a terrible format because it piggybacks off of another format in the file ending, causing security issues and requiring parsers to suddenly anticipate something completely different under the same name, and the "failsafe" is nothing but the parser actually doing what it's supposed to do: displaying a png image.
If mozilla had created the format to be "apng" and not use png as ending then it would willingly supported more widely, right now it's like expecting that a jpg has multiple images in it, or an mp3 file with a video stream in it.

Siral_Exan said:
What BlueDingo said. As an iPhone user I have to use external apps to download, play, and sometimes delete, videos just to tag them. And if I want to view it again, I have to access said app and keep those on, using memory (which can be trivial) and time (less so). Albeit those are inconveniences, I would prefer to use flash 'cause I at least have a browser for that, or GIFs above all.

You can't get rid of something that's useful, no matter how obsolete or outdated it is.

If you buy a tool for a specific purpose and realize said tool is inadequate you may need to reevaluate your choice.

In other words: Android browsers are allowed to use a browser engine that isn't dictated by apple, and got castrated by apple to be inferior to their browser both in compatibility as well as in speed.

Updated by anonymous

NotMeNotYou said:

If mozilla had created the format to be "apng" and not use png as ending then it would willingly supported more widely, right now it's like expecting that a jpg has multiple images in it, or an mp3 file with a video stream in it.

There is MNG which is basically the same thing as APNG, but almost nothing supports it.

Updated by anonymous

NotMeNotYou said:
If you buy a tool for a specific purpose and realize said tool is inadequate you may need to reevaluate your choice.

In other words: Android browsers are allowed to use a browser engine that isn't dictated by apple, and got castrated by apple to be inferior to their browser both in compatibility as well as in speed.

Care to simplify that some more? You make me think that my "tools" are inadequate, and I can prove otherwise.

Updated by anonymous

Siral_Exan said:
Care to simplify that some more? You make me think that my "tools" are inadequate, and I can prove otherwise.

Apple release phone.
Apple release document saying other browser creator can play with Apple's toys.
Apple only give browser creators old toys that suck, keeps shiny new toys to themselves.

In all seriousness, I don't know what you want me to tell you. Apple doesn't care about standards making them not support new stuff every else supports, they also do not give other browsers access to the tools they need to work as they do on other devices.
Further, you are using a phone, with a 5" screen, and a touch screen keyboard to do data entry. That is masochism, plain and simple.

Updated by anonymous

NotMeNotYou said:
Further, you are using a phone, with a 5" screen, and a touch screen keyboard to do data entry. That is masochism, plain and simple.

Can you consider any flaw a PC might have over an iPhone, and I'm willing to include cost? I save myself a lot of time, it is convenient to the point to the point to the point where I can micromanage WoW, chat, or tag on E621 while being away from my PC. Instead of scanning through active tabs, I can use the search function to find active tabs.

Basically, using a PC is optimal in general, but iPhone is better at ease of access. Even with my complaint about WebM and Flash, it is faster to access those on my phone than to boot up a PC. I see the complaints that BlueDingo listed as the same thing, people would rather use something easier than something harder.

Updated by anonymous

Siral_Exan said:
Can you consider any flaw a PC might have over an iPhone, and I'm willing to include cost? I save myself a lot of time, it is convenient to the point to the point to the point where I can micromanage WoW, chat, or tag on E621 while being away from my PC. Instead of scanning through active tabs, I can use the search function to find active tabs.

Basically, using a PC is optimal in general, but iPhone is better at ease of access. Even with my complaint about WebM and Flash, it is faster to access those on my phone than to boot up a PC. I see the complaints that BlueDingo listed as the same thing, people would rather use something easier than something harder.

I used an iPad during the majority of my tagging tagging, but I added a keyboard to it (mostly for quick copy paste and close window).

It's not a perfect replacement though, and I would have gotten a lot more done with the computer.

NotMeNotYou said:
Apple doesn't care about standards making them not support new stuff every else supports

At least Safari supports APNG.

I hate Safari though :v

Updated by anonymous

I'm moreso on the side that using huge .gif files to view only a 3 second HD 1080p 60 fps animation is horrendously inefficient when it comes to data storage and transfer. It is something that is moreso used for showing simple, light animations, and having to go through the trouble of *making* and *viewing* said 3 second animation that is over 20 mb doesn't seem worth the time, at least, to me.

Updated by anonymous

Siral_Exan said:
Can you consider any flaw a PC might have over an iPhone, and I'm willing to include cost? I save myself a lot of time, it is convenient to the point to the point to the point where I can micromanage WoW, chat, or tag on E621 while being away from my PC. Instead of scanning through active tabs, I can use the search function to find active tabs.

Basically, using a PC is optimal in general, but iPhone is better at ease of access. Even with my complaint about WebM and Flash, it is faster to access those on my phone than to boot up a PC. I see the complaints that BlueDingo listed as the same thing, people would rather use something easier than something harder.

I guess the main point here is that this topic started to go off tracks from your and bluedingos post.

This is not about banning gif files in favor of webm - this is about trying to make gifs to have some level of limits for them as they can't get into level of webm or flash content in this reality. What I'm meaning by this is that if artist only posts their work in webm and/or flash, that nobody starts converting that into 100 MB beast of a gif, just because they can, there's no guidelines againts that and just because there's no limit.

Good example of this might be zonkpunch stuff, they have been creating minutes long HD videos lately which are already at 50 MB mark with video format, so of course fitting them inside gif won't work. If you look at post #811914 for example, there's 6 official (+1 unofficial) gif files made from several parts of the video, so they boil down the whole video in under 6 MB of gifs which is still easy to consume.

If we go like things are now, there's nothing stopping me from creating that video in gif and splitting them into 100 MB chunks.

And of course with content that was created only as gif and/or fits nicely inside gif would still be there like always, something like sketch uploads e.g. post #1126691 which is directly from artist or post #878765 which was converted from flash.

Aanyi said:
I'm moreso on the side that using huge .gif files to view only a 3 second HD 1080p 60 fps animation is horrendously inefficient when it comes to data storage and transfer. It is something that is moreso used for showing simple, light animations, and having to go through the trouble of *making* and *viewing* said 3 second animation that is over 20 mb doesn't seem worth the time, at least, to me.

Yes, this has been the main topic all the time, not the usage of inferi... apples products and apng. You can still have your 3 second loops, but just smaller resolution and frame rate that gifs can actually handle and what is actually then much more pleasureable to view on mobile as well when it doesn't load the image for thousand years. Then have the original/higher quality stuff set as parent post.

Also would really like to have opinion about the filesize limit as well. I have always kept 10 MB in the realm of sanity, so 20 MB feels like leeway on that, even though 20 MB still sounds absurdly large to me personally. Keeping in mind that many sites do have limits already: 10 MB on FA, 2 MB on tumblr, 36 MB on FurryNetwork and Inkbunny, 30 MB on deviantart, Imgur starts converting to gifv after 2 MB, 10 MB on weasyl, etc. (some may have changed or be differend, didn't double check)

Updated by anonymous

Mario69 said:
I do agree with you, but my point is that unless you implement some extra code, regular png file is file.png and apng file is file.png. Also there's 13 apng files and like 16 000 animated gifs, so the problem isn't that apparent.
So it's not like e6 supports the apng files, but they just happen to use exactly the same file extension so they can get trough regardless.

NotMeNotYou said:
Also, APNG is a terrible format because it piggybacks off of another format in the file ending, causing security issues and requiring parsers to suddenly anticipate something completely different under the same name, and the "failsafe" is nothing but the parser actually doing what it's supposed to do: displaying a png image.

The file extension is beside the point

APNG is by definition a PNG. The file extension is true, because an APNG actually and completely is a PNG.
(that's because a PNG is permitted to have any number of ancillary chunks.)

Assigning it a different extension wouldn't change anything really.

That said, you shouldn't rely on extensions to be truthful anyway.

it's like expecting that a jpg has multiple images in it,

Exactly. (you can actually do that BTW, it's a similar exploit of definitions)

Updated by anonymous

savageorange said:
The file extension is beside the point

APNG is by definition a PNG. The file extension is true, because an APNG actually and completely is a PNG.
(that's because a PNG is permitted to have any number of ancillary chunks.)

Assigning it a different extension wouldn't change anything really.

That said, you shouldn't rely on extensions to be truthful anyway.

Exactly. (you can actually do that BTW, it's a similar exploit of definitions)

Exploiting design flaws is not good programming, unless it's about security assessments. On the other hand it would be hilarious if the png group decided to fix that exploit and watch Mozilla flop around with a no longer working format.

On topic, I'm ambivalent towards Filesize limits, as long as it doesn't negatively affect the server.
If large gif files cause disproportionate strain on the server then by all means implement a tighter cap.

Updated by anonymous

NotMeNotYou said:
Exploiting design flaws is not good programming, unless it's about security assessments. On the other hand it would be hilarious if the png group decided to fix that exploit and watch Mozilla flop around with a no longer working format.

I don't think they can fix that exploit; it's a fundamental design feature of the format (hence why I say APNG files are genuine PNG files. Not good, but genuine.). Some (non-streaming/lowlevel) uses of LibPNG could be specifically patched to reject APNG (but this would be controversial, because it would be unambigously directed at APNG), other uses could not.

Specifically "calling out" APNG like that could also result in a fork, which, yeah.. no one wants that.

api docs here , fwiw. "High level read interface" is a good place to start looking.

Updated by anonymous

post #760109
Flash, 1080p, 60 FPS, interactive with many scenes, sound, 8 MB

post #834220
WebM, 1080p, 60 FPS, one scene looped, no sound, 500 KB.

post #760111
GIF, 300p, 33.333 FPS, one scene looped, no sound, 5 MB.

These have been up for about year now, these are all fine, everything is linked properly.

But what is this?

post #1143155
GIF, 1080p, 33.333 FPS, one scene looped, no sound, 45 MB. (actually makes browser freeze)

And because "higher quality stays" the 5 MB version post #760111 will most likely be replaced by this monster and even if it won't, I see absolutely no reason to keep the 45 MB gif version when there are already interactive flash and full frame rate and color spectrum having webm - and fully working gif file where you can clearly see what is happening especially if viewing with mobile device.

Another thing why I want this limitation to happen, is because some of these conversions, including this, are badly optimized. Now it's race againts who can make the best gif version, regardless of what artist have already created or others have tried to make in the levels of sanity.
I can make better version of that now uploaded gif file which is less in filesize and if that gets accepted, I can even raise frame rate a notch to make it better again, but I wouldn't want to upload anything larger from aboves 5 MB example to begin with:
https://mega.nz/#!hcAFUSxQ!3z3O4VhBoBc7g0QkVFvFYB1jdXy_ubb5uNClbDe2eqA

This is the issue what I'm trying to counter here. 20 MB would be the baseline for not uploading unoptimized pieces of "higher quality".

Updated by anonymous

Mario69 said:
...

Agreed. You have idiots who just take a 1080p video and just straight convert it to a GIF with little to no optimizations so they can have "the best" quality upload...but in the end it's just horrible mega-file that no one wants to play, and to make matters worse it can cause the deletion of small easy-to-play GIFs because technically it's higher quality. UGH.

The thing is...GIFs only still exist because of mobile. If mobile could easily play WEBM we wouldn't really needs GIFs anymore...but what mobile user wants to download a fucking 45MB GIF!? I mean Jesus they could be using mobile data! In certain countries (like Canada...yeah you think they're a modern nation, but their mobile plans suck) that's a big chunk of their overall data limit dedicated to loading one friggin animation. "Honey, why did we go over our on our data plan this month?" "Oh, it's because I watched 3 GIFs...we now owe them 200 dollars."

Seriously a 20MB limit is generous. If you can't find a way to fit a video into that limit then it's probably not something that should be made into a GIF anyways. For instance...the entire LOTR trilogy...probably best to not put that into a GIF.

Updated by anonymous

Dyrone said:
but what mobile user wants to download a fucking 45MB GIF!?

I initially thought the same thing. But you realize that if you're connected wirelessly to a router (eg. at home with a DSL connection; sitting in McDonalds; in a library...), then you are not using your mobile data.

I still don't see why anyone would do it, though.. these huge GIFs are laggy enough on a desktop PC...

Updated by anonymous

  • 1