Limiting .gif sizes

Phoenix86

Lifer
May 21, 2003
14,644
10
81
Inline linking to ridiculously, an unnecessarily, large .gifs needs to be limited. Badly.

I could post example after example but anyone who visits the Jesus's middle name is Hume! thread knows what I'm talking about. Regularly 40-100+Mb images are linked inline.

I actually use this page as a stress test for connections. It's FAR more stressful than anything I have seen due to the raw number of simultaneous threads and size/thread.

Even on a moderately fast connection, 20 Mb/s that's a blazing 2.5MB/s, or 28 seconds to load.

Per image.

With multiple large .gifs linked in a 100ppp, hell even 20ppp settings, it takes MINUTES to load.

Almost all of these will shrink down to under 10MB, often closer to ~4MB VASTLY improving page loads. All you have to do is force users to load properly compressed images.

It's like allowing .raw vs. .jpg, which would never be allowed, so why allow this?
 

Spacehead

Lifer
Jun 2, 2002
13,067
9,858
136
Outside of the Hume thread is it much of a problem?
There's a lot of forums here i don't visit & even in OT i'm not looking at every thread so just curious.
 

Phoenix86

Lifer
May 21, 2003
14,644
10
81
Outside of the Hume thread is it much of a problem?
There's a lot of forums here i don't visit & even in OT i'm not looking at every thread so just curious.

Yes, people do it in other threads, but that and the post the cutest things one are really bad due to most posts being pics/gifs.

The thing is, it's exceedingly easy to fix, just post properly compressed images. gfycat will automatically do this and often already has the images because so many people use it. It'll detect a duplicate and link you to the already fixed .gif.

Since there's no rule, people won't bother, thus the problem.
 

balloonshark

Diamond Member
Jun 5, 2008
7,155
3,624
136
If a gif takes X amount of seconds to watch it should be linked to instead of posted inline or the gfycat version should be posted instead.

I also vote to punish the folks who chronically chit chat and argue in the Hume thread. If you have a direct question about a pic or vid that's fine but keep your opinions to yourselves.
 

Phoenix86

Lifer
May 21, 2003
14,644
10
81
Are you on 100 post per page? Took way longer for me, at least 3 minutes.

Can a mod reply to this? Kinda forgot about this thread since none replied.
 

Z15CAM

Platinum Member
Nov 20, 2010
2,184
64
91
www.flickr.com
F*&K'd that up - LOL
AKYZt5
BginrV
 

balloonshark

Diamond Member
Jun 5, 2008
7,155
3,624
136
Are you on 100 post per page? Took way longer for me, at least 3 minutes.

Can a mod reply to this? Kinda forgot about this thread since none replied.
I'm pretty sure I'm set at the default. I checked that page and it's 25 posts. When I posted the link above the page wasn't at 25 posts. Strange though as in my settings it show 30 posts per page. My download speed is 50Mbps.
 

Jodell88

Diamond Member
Jan 29, 2007
8,762
30
91
Another solution would be to ban gifs from imgur, since that one site is the problem.

I'm not sure if it can be done however.
 

Ken g6

Programming Moderator, Elite Member
Moderator
Dec 11, 1999
16,700
4,661
75
I suppose this goes back to [thread=2430842]this thread[/thread]. At the time I voted no on allowing GIFV/WEBM because I didn't want to encourage more animation/video posting. But if you can't avoid them, might as well use the smallest format, I guess.

Imgur automatically compresses large GIFs to GIFV. So it might make sense to only allow GIFVs from Imgur.
 

Phoenix86

Lifer
May 21, 2003
14,644
10
81
I suppose this goes back to [thread=2430842]this thread[/thread]. At the time I voted no on allowing GIFV/WEBM because I didn't want to encourage more animation/video posting. But if you can't avoid them, might as well use the smallest format, I guess.

Imgur automatically compresses large GIFs to GIFV. So it might make sense to only allow GIFVs from Imgur.

Then it does a shitty job, since imgur is the #1 link that causes problems.

Take this link for example.

http://i.imgur.com/Rw8XUKe.gif

57.6mb and it's complete potato quality. If the user tried to upload it to gfycat.com and post that version 2 things would have happened. First, it's already there, so no conversation needed, second it's 2mb.

http://www.gfycat.com/SmallSmoggyDavidstiger
 

John Connor

Lifer
Nov 30, 2012
22,757
619
121
The hume thread just got two new large gifs and it's competently annoying! Especially when someone posts two of them no less! I think a rule should be made where large gifs should just be a link. I pity Smartpone users. Which I am one.
 

Ken g6

Programming Moderator, Elite Member
Moderator
Dec 11, 1999
16,700
4,661
75
I finally got around to making a user script to view imgur videos as "gifv" (really mp4 or webm) videos.

I just wrote it so not much testing done, but it seems to work on the new "meme" thread.

Code:
// ==UserScript==
// @name        Imgur Gif to Video
// @namespace   http://sites.google.com/site/kenscode/
// @include     *
// @version     1.2
// @grant       none
// ==/UserScript==
var imgurgifs = document.querySelectorAll('img[src^="http://i.imgur.com/"][src$=".gif"],img[src^="http://imgur.com/"][src$=".gif"]');
for (var i=0; i<imgurgifs.length; i++) {
  imgurgifs[i].style.display = "none";
}
for (var i=0; i<imgurgifs.length; i++) {
  var vid = document.createElement("video");
  vid.loop="loop";
  vid.muted="muted";
  vid.autoplay="autoplay";
  var srcstr = imgurgifs[i].src.replace('//imgur.com', '//i.imgur.com');
  var vidsrc = document.createElement("source");
  vidsrc.src = srcstr.slice(0,-3) + 'mp4';
  vidsrc.type = 'video/mp4';
  vid.appendChild(vidsrc);
  vidsrc = document.createElement("source");
  vidsrc.src = srcstr.slice(0,-3) + 'webm';
  vidsrc.type = 'video/webm';
  vid.appendChild(vidsrc);
  vidsrc = imgurgifs[i].cloneNode(false);
  vid.appendChild(vidsrc);
  var imgparent = imgurgifs[i].parentNode;
  imgparent.insertBefore(vid, imgurgifs[i]);
  imgparent.removeChild(imgurgifs[i]);
}

Edit: But, of course, I don't think there's any way to use a user script on a smartphone. :\
 
Last edited:

destrekor

Lifer
Nov 18, 2005
28,799
359
126
I finally got around to making a user script to view imgur videos as "gifv" (really mp4 or webm) videos.

I just wrote it so not much testing done, but it seems to work on the new "meme" thread.

Code:
// ==UserScript==
// @name        Imgur Gif to Video
// @namespace   http://sites.google.com/site/kenscode/
// @include     *
// @version     1
// @grant       none
// ==/UserScript==
var imgurgifs = document.querySelectorAll('img[src^="http://i.imgur.com/"][src$=".gif"]');
for (var i=0; i<imgurgifs.length; i++) {
  imgurgifs[i].style.display = "none";
}
for (var i=0; i<imgurgifs.length; i++) {
  var vid = document.createElement("video");
  vid.loop="loop";
  vid.muted="muted";
  vid.autoplay="autoplay";
  var vidsrc = document.createElement("source");
  vidsrc.src = imgurgifs[i].src.slice(0,-3) + 'mp4';
  vid.appendChild(vidsrc);
  vidsrc = document.createElement("source");
  vidsrc.src = imgurgifs[i].src.slice(0,-3) + 'webm';
  vid.appendChild(vidsrc);
  var imgparent = imgurgifs[i].parentNode;
  imgparent.insertBefore(vid, imgurgifs[i]);
  imgparent.removeChild(imgurgifs[i]);
}

Edit: But, of course, I don't think there's any way to use a user script on a smartphone. :\

Nice!

I just gave this a test. (and installed TamperMonkey as this is my first ever user script, never messed with them before)
Impressive. Now, without having any "match" setting, is this something that will actually apply all over the web when I browse in Chrome? Because if so, you freaking rock! (well, you still do, but you get the point! lol)

I love how it will still embed the gifv. Which brings up the next idea: people will link gifv files because they are considerate and want to avoid the massive bandwidth waste that are large gifs. But, the site will natively embed gifv's like it will gifs. But it is nice that, at least for regular gifs that are embedded, this script will embed the appropriate gifv instead. So we're halfway there to making gif's that much more tolerable on this forum!

Way to go Ken, you rock!
 

Ken g6

Programming Moderator, Elite Member
Moderator
Dec 11, 1999
16,700
4,661
75
Now, without having any "match" setting, is this something that will actually apply all over the web when I browse in Chrome? Because if so, you freaking rock! (well, you still do, but you get the point! lol)
It will replace all Imgur gifs on all sites with video elements. It doesn't work on gifs from other sites.

I just updated it so that, hopefully, for any gifs that are small enough that Imgur didn't produce a video, it will still work. Hard to be sure, though.
 

Ken g6

Programming Moderator, Elite Member
Moderator
Dec 11, 1999
16,700
4,661
75