Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Request: Load only first frame, rest on demand #21

Open
Bitsky opened this issue Dec 29, 2014 · 5 comments
Open

Request: Load only first frame, rest on demand #21

Bitsky opened this issue Dec 29, 2014 · 5 comments

Comments

@Bitsky
Copy link

Bitsky commented Dec 29, 2014

Many websites (eg Tumblr) often have lots of large gifs. While the addon stops the animation, the complete gif is still loaded in the background. For people with low bandwidth this keeps such sites unuseable (eg only 10 gifs a 3MB mean a 30MB download per page).
It would reduce traffic dramatically if loading the gif stops after the first frame. I don't mind waiting for a gif to load when I want to watch it; but always loading them in the background grinds my connection down to a halt.
You could make in an extra option like "Stop loading gif after first frame was received".

@simonlindholm
Copy link
Owner

This is hard, certainly harder than #16. I don't think there's a way, with the Firefox APIs I'm using, to know when the first frame of a GIF has been received, or for that sake, that there even are images being loaded... One would probably need to do something completely different, with http-on-modify-request and manual GIF parsing or so. Which is also quite error-prone.

I'll leave the issue open, because it's a valid feature request, but I don't expect to work on this.

@simonlindholm
Copy link
Owner

As mentioned in #35, https://github.com/adamfur/GifJam does this for Chrome (well, for URLs containing .gif).

@FredGithub
Copy link

This would be so freaking nice, but I get why it's harder to do...

@evivz
Copy link

evivz commented Sep 10, 2017

Fb does it. Anyone has idea how fb does it?

@simonlindholm
Copy link
Owner

I imagine their server extracts the first frame and sends it to the client, and then load the rest as a separate JS request (probably transcoded as a video, so it loads faster). Can't really use that strategy on the client side.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants