# Very large gifs should be shown as previews

**URL:** https://meta.discourse.org/t/very-large-gifs-should-be-shown-as-previews/25423
**Category:** Feature
**Created:** [February 19, 2015, 8:20pm UTC](https://meta.discourse.org/t/very-large-gifs-should-be-shown-as-previews/25423 "2015-02-19T20:20:18Z")
**Posts on this page:** 18
**Page:** 2

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [March 25, 2015, 6:41pm UTC](https://meta.discourse.org/t/very-large-gifs-should-be-shown-as-previews/25423/21 "2015-03-25T18:41:39Z")

</div>

Yes @techapj can you add support for gfycat to oneboxer?

---

<div class="post-metadata">

### Author: ![chapel](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/chapel/32/122414_2.png) [@chapel](https://meta.discourse.org/u/chapel)
#### Post date: [March 25, 2015, 7:59pm UTC](https://meta.discourse.org/t/very-large-gifs-should-be-shown-as-previews/25423/22 "2015-03-25T19:59:27Z")

</div>

I had added it to onebox. It looks like for some reason just white listing it like imgur didn’t worked as expected.

Definitely the first step is onebox embedding gfycat.

The next step I think would be for a plugin to do the gif → gfycat conversion. Anyone could do this, and if gfycat support is properly added to onebox, I would do it eventually if no one else did.

---

<div class="post-metadata">

### Author: ![riking](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/riking/32/170938_2.png) [@riking](https://meta.discourse.org/u/riking)
#### Post date: [March 26, 2015, 3:17am UTC](https://meta.discourse.org/t/very-large-gifs-should-be-shown-as-previews/25423/23 "2015-03-26T03:17:20Z")

</div>

I suspect it didn’t get properly whitelisted in the HTML sanitizer.

---

<div class="post-metadata">

### Author: ![techAPJ](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/techapj/32/342990_2.png) [@techAPJ](https://meta.discourse.org/u/techAPJ)
#### Post date: [March 26, 2015, 2:37pm UTC](https://meta.discourse.org/t/very-large-gifs-should-be-shown-as-previews/25423/24 "2015-03-26T14:37:31Z")

</div>

It seems like there is a bug with gfycat oEmbed, it always returns [CooperativeScentedAnkolewatusi](http://gfycat.com/CooperativeScentedAnkolewatusi) in the [iframe](http://gfycat.com/cajax/oembed/AggressiveClosedEstuarinecrocodile).

Various links that confirms the issue:

- [https://twitter.com/SlackHQ/status/517810886975975424](https://twitter.com/SlackHQ/status/517810886975975424)
- [https://twitter.com/torrez/status/512033447154438144](https://twitter.com/torrez/status/512033447154438144)
- [Reddit - Please wait for verification](http://www.reddit.com/r/gfycat/comments/2kq4da/bug_gfycats_oembed_does_not_work_at_all/)

Removing gfycat from whitelist, until this issue is resolved.

---

<div class="post-metadata">

### Author: ![elberet](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/elberet/32/122404_2.png) [@elberet](https://meta.discourse.org/u/elberet)
#### Post date: [March 26, 2015, 2:50pm UTC](https://meta.discourse.org/t/very-large-gifs-should-be-shown-as-previews/25423/25 "2015-03-26T14:50:31Z")

</div>

The OpenGraph data seems to be correct, can’t that be used instead of oEmbed?

---

<div class="post-metadata">

### Author: ![techAPJ](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/techapj/32/342990_2.png) [@techAPJ](https://meta.discourse.org/u/techAPJ)
#### Post date: [March 26, 2015, 6:45pm UTC](https://meta.discourse.org/t/very-large-gifs-should-be-shown-as-previews/25423/26 "2015-03-26T18:45:39Z")

</div>

Okay, added custom _gfycat_ handler to use OpenGraph data endpoints instead of oEmbed:

[https://github.com/discourse/onebox/pull/285](https://github.com/discourse/onebox/pull/285)

---

<div class="post-metadata">

### Author: ![chapel](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/chapel/32/122414_2.png) [@chapel](https://meta.discourse.org/u/chapel)
#### Post date: [March 27, 2015, 7:25am UTC](https://meta.discourse.org/t/very-large-gifs-should-be-shown-as-previews/25423/27 "2015-03-27T07:25:20Z")

</div>

Does this do the gif like embed, or does it require pressing play?

---

<div class="post-metadata">

### Author: ![techAPJ](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/techapj/32/342990_2.png) [@techAPJ](https://meta.discourse.org/u/techAPJ)
#### Post date: [March 27, 2015, 7:26am UTC](https://meta.discourse.org/t/very-large-gifs-should-be-shown-as-previews/25423/28 "2015-03-27T07:26:51Z")

</div>

It requires pressing play. Demo pic:

![](https://global.discourse-cdn.com/meta/original/3X/a/6/a6a6ab15a1dadf825f925e54ba88c0c39288f2a7.png)

---

<div class="post-metadata">

### Author: ![riking](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/riking/32/170938_2.png) [@riking](https://meta.discourse.org/u/riking)
#### Post date: [March 27, 2015, 7:27am UTC](https://meta.discourse.org/t/very-large-gifs-should-be-shown-as-previews/25423/29 "2015-03-27T07:27:48Z")

</div>

This is because if gifs without sound autoplay, then gifs with sound (could) autoplay too..

---

<div class="post-metadata">

### Author: ![chapel](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/chapel/32/122414_2.png) [@chapel](https://meta.discourse.org/u/chapel)
#### Post date: [March 28, 2015, 1:29am UTC](https://meta.discourse.org/t/very-large-gifs-should-be-shown-as-previews/25423/30 "2015-03-28T01:29:02Z")

</div>

gyphy gifs don’t have sound because they are converted from gifs.

The whole point is not to embed a video, but to use video like a gif.

That means the gif should loop (yes I know not all gifs loop) and auto play. At the very least, it should loop until the user presses stop.

---

<div class="post-metadata">

### Author: ![lidel](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/lidel/32/115991_2.png) [@lidel](https://meta.discourse.org/u/lidel)
#### Post date: [March 29, 2015, 11:30pm UTC](https://meta.discourse.org/t/very-large-gifs-should-be-shown-as-previews/25423/31 "2015-03-29T23:30:48Z")

</div>

I understand @riking’s concern, but in this case it is totally safe to whitelist _autoplay_+_loop_ for oneboxed Gifly GIF-videos as they do not have sound.

Note that Imgur also does not support sound, but as a precaution oneboxed GIF-videos are muted by default:

```html
<video id="video" autoplay="autoplay" muted="muted" preload="auto" loop="loop" poster="//i.imgur.com/YfPjduYh.jpg">
    (...)
</video>

```

We should simply do the same for Gfycat.

---

<div class="post-metadata">

### Author: ![chapel](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/chapel/32/122414_2.png) [@chapel](https://meta.discourse.org/u/chapel)
#### Post date: [April 5, 2015, 9:41pm UTC](https://meta.discourse.org/t/very-large-gifs-should-be-shown-as-previews/25423/32 "2015-04-05T21:41:57Z")

</div>

[http://gfycat.com/CluelessElderlyHerald](http://gfycat.com/CluelessElderlyHerald)

Doesn’t look like this is working? ☹

---

<div class="post-metadata">

### Author: ![techAPJ](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/techapj/32/342990_2.png) [@techAPJ](https://meta.discourse.org/u/techAPJ)
#### Post date: [April 6, 2015, 1:41am UTC](https://meta.discourse.org/t/very-large-gifs-should-be-shown-as-previews/25423/33 "2015-04-06T01:41:55Z")

</div>

The gem needs to be updated.

@zogstrip can you please bump onebox version and update the gem?

---

<div class="post-metadata">

### Author: ![zogstrip](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/zogstrip/32/512781_2.png) [@zogstrip](https://meta.discourse.org/u/zogstrip)
#### Post date: [April 6, 2015, 8:50am UTC](https://meta.discourse.org/t/very-large-gifs-should-be-shown-as-previews/25423/34 "2015-04-06T08:50:38Z")

</div>

There you go 😉

[https://github.com/discourse/discourse/commit/f180d2202564febf8c6195684c01b6c7f51d4faa](https://github.com/discourse/discourse/commit/f180d2202564febf8c6195684c01b6c7f51d4faa)

---

<div class="post-metadata">

### Author: ![riking](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/riking/32/170938_2.png) [@riking](https://meta.discourse.org/u/riking)
#### Post date: [April 6, 2015, 4:58pm UTC](https://meta.discourse.org/t/very-large-gifs-should-be-shown-as-previews/25423/35 "2015-04-06T16:58:02Z")

</div>

@techAPJ I rebuilt @chapel’s post and it seems that it isn’t looped by default?

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [September 13, 2017, 3:25am UTC](https://meta.discourse.org/t/very-large-gifs-should-be-shown-as-previews/25423/36 "2017-09-13T03:25:50Z")

</div>

I believe this is now handled with @vinothkannans recent PR.

[http://img0.joyreactor.cc/pics/post/%D0%B3%D0%B8%D1%84%D0%BA%D0%B8-superjail-%D0%BC%D1%83%D0%BB%D1%8C%D1%82%D1%81%D0%B5%D1%80%D0%B8%D0%B0%D0%BB-%D0%A1%D0%B2%D0%BE%D1%8F-%D0%B0%D1%82%D0%BC%D0%BE%D1%81%D1%84%D0%B5%D1%80%D0%B0-1886210.gif(image larger than 10 MB)](http://img0.joyreactor.cc/pics/post/%D0%B3%D0%B8%D1%84%D0%BA%D0%B8-superjail-%D0%BC%D1%83%D0%BB%D1%8C%D1%82%D1%81%D0%B5%D1%80%D0%B8%D0%B0%D0%BB-%D0%A1%D0%B2%D0%BE%D1%8F-%D0%B0%D1%82%D0%BC%D0%BE%D1%81%D1%84%D0%B5%D1%80%D0%B0-1886210.gif)

The xxxxtra large Gif was (eventually, pending background tasks) replaced with image placeholder. @vinothkannans does the tooltip work now so I can mouse over this kind of random looking generic image placeholder and get a plain English explanation of what happened?

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [November 5, 2018, 11:45pm UTC](https://meta.discourse.org/t/very-large-gifs-should-be-shown-as-previews/25423/37 "2018-11-05T23:45:06Z")

</div>

Let’s see if this is still working:

[https://media2.giphy.com/media/l1J9u3TZfpmeDLkD6/giphy.gif(image larger than 10 MB)](https://media2.giphy.com/media/l1J9u3TZfpmeDLkD6/giphy.gif)

---

<div class="post-metadata">

### Author: ![chapoi](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/chapoi/32/537252_2.png) [@chapoi](https://meta.discourse.org/u/chapoi)
#### Post date: [December 4, 2025, 11:33am UTC](https://meta.discourse.org/t/very-large-gifs-should-be-shown-as-previews/25423/38 "2025-12-04T11:33:35Z")

</div>



[Previous page](https://meta.discourse.org/t/very-large-gifs-should-be-shown-as-previews/25423.md?page=1)
