# TIL: Discourse can embed imgur albums and galleries

**URL:** https://meta.discourse.org/t/til-discourse-can-embed-imgur-albums-and-galleries/27406
**Category:** Feature
**Created:** [4월 10, 2015, 6:59오전 UTC](https://meta.discourse.org/t/til-discourse-can-embed-imgur-albums-and-galleries/27406 "2015-04-10T06:59:48Z")
**Posts on this page:** 18
**Page:** 1

<div class="post-metadata">

### Author: ![erlend\_sh](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/erlend_sh/32/119475_2.png) [@erlend\_sh](https://meta.discourse.org/u/erlend_sh)
#### Post date: [4월 10, 2015, 6:59오전 UTC](https://meta.discourse.org/t/til-discourse-can-embed-imgur-albums-and-galleries/27406/1 "2015-04-10T06:59:48Z")

</div>

Continuing the discussion from [Oneboxing: Albums from imgur get a cute kitten as onebox](https://meta.discourse.org/t/oneboxing-albums-from-imgur-get-a-cute-kitten-as-onebox/8186)

We just found this feature by accident on our forum today. Here’s an embedded imgur gallery, simply by entering the link `http://imgur.com/a/PWgY0?gallery`

[http://imgur.com/a/PWgY0?gallery](http://imgur.com/a/PWgY0?gallery)

So nifty! I dunno if the Discourse devs did something specifically for imgur recently or if it’s just a result of imgur’s new and improved embeds initiative (are they more OpenGraph compatible now?).

[![Imgur](https://global.discourse-cdn.com/meta/original/4X/b/c/3/bc343426240f865f9737fb84b140c40cbcd9aaa9.png "Imgur") ](https://imgur.com/)

In any case, yay for developers!

---

<div class="post-metadata">

### Author: ![eviltrout](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/eviltrout/32/5275_2.png) [@eviltrout](https://meta.discourse.org/u/eviltrout)
#### Post date: [4월 10, 2015, 3:37오후 UTC](https://meta.discourse.org/t/til-discourse-can-embed-imgur-albums-and-galleries/27406/2 "2015-04-10T15:37:13Z")

</div>

We’ve supported this for a while. I checked their oembed support for galleries and they produce the nice formatting so I let it through 😄

---

<div class="post-metadata">

### Author: ![mik01aj](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mik01aj/32/116019_2.png) [@mik01aj](https://meta.discourse.org/u/mik01aj)
#### Post date: [9월 10, 2015, 12:34오후 UTC](https://meta.discourse.org/t/til-discourse-can-embed-imgur-albums-and-galleries/27406/3 "2015-09-10T12:34:17Z")

</div>

Looks like it doesn’t work anymore ☹

 ![](https://global.discourse-cdn.com/meta/original/3X/1/8/18ef183da4d7067f0f83060fd1174acb98a158be.png)

Related:

> [@Imgur embeds broken](https://meta.discourse.org/t/imgur-embeds-broken/29869):
>
> Imgur galleries used to show up with a nice onebox preview of the gallery, but this broke recently and just a link is shown. e.g. [[Album] 10 More awesome Photoshop tutorials. [10 More awesome Photoshop tutorials.] ](https://imgur.com/a/PWgY0) I viewed [this topic on Meta](https://meta.discourse.org/t/til-discourse-can-embed-imgur-albums-and-galleries/27406) on May 26th and the preview was working, now it is not. The preview in the first post will…

---

<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: [9월 10, 2015, 3:25오후 UTC](https://meta.discourse.org/t/til-discourse-can-embed-imgur-albums-and-galleries/27406/4 "2015-09-10T15:25:49Z")

</div>

> [@mik01aj](#):
>
> Looks like it doesn’t work anymore

That’s because:

> **[imgur](https://help.imgur.com/hc/en-us)**

But I made some changes recently, so it should not be broken anymore..

> **[imgur](https://help.imgur.com/hc/en-us)**

---

<div class="post-metadata">

### Author: ![mik01aj](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mik01aj/32/116019_2.png) [@mik01aj](https://meta.discourse.org/u/mik01aj)
#### Post date: [9월 10, 2015, 4:02오후 UTC](https://meta.discourse.org/t/til-discourse-can-embed-imgur-albums-and-galleries/27406/5 "2015-09-10T16:02:24Z")

</div>

I just checked on [http://try.discourse.org/](http://try.discourse.org/) and it still doesn’t work. I see only the first image form the gallery.

---

<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: [9월 10, 2015, 4:10오후 UTC](https://meta.discourse.org/t/til-discourse-can-embed-imgur-albums-and-galleries/27406/6 "2015-09-10T16:10:37Z")

</div>

That’s because Onebox gem version hasn’t been updated after that commit.

@zogstrip can you please update onebox version?

---

<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: [9월 10, 2015, 8:03오후 UTC](https://meta.discourse.org/t/til-discourse-can-embed-imgur-albums-and-galleries/27406/7 "2015-09-10T20:03:56Z")

</div>

> [@techAPJ](#):
>
> @zogstrip can you please update onebox version?

Done

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

---

<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: [3월 22, 2016, 1:27오후 UTC](https://meta.discourse.org/t/til-discourse-can-embed-imgur-albums-and-galleries/27406/8 "2016-03-22T13:27:40Z")

</div>

Imgur **albums** are not getting (properly) oneboxed anymore.. ☹

It seems like Imgur changed metadata info recently and there is no way to detect if the link is an image or album by looking at just metadata info.

Previously there used to be multiple twitter metadata image tags to indicate that the link is an album, but they are not present anymore.

The only way to work around is this is to use [Imgur API](https://api.imgur.com/), but the API only allows access to registered application, as per:

> This version of the API, version 3, uses OAuth 2.0. This means that all requests will need to be encrypted and sent via SSL/TLS to https://. **It also means that you need to register your application, even if you aren’t allowing users to login.**

---

<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: [3월 29, 2016, 11:50오전 UTC](https://meta.discourse.org/t/til-discourse-can-embed-imgur-albums-and-galleries/27406/9 "2016-03-29T11:50:51Z")

</div>

This is now fixed via:

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

---

<div class="post-metadata">

### Author: ![Alankrit\_Choudh](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/alankrit_choudh/32/119698_2.png) [@Alankrit\_Choudh](https://meta.discourse.org/u/Alankrit_Choudh)
#### Post date: [3월 29, 2016, 7:10오후 UTC](https://meta.discourse.org/t/til-discourse-can-embed-imgur-albums-and-galleries/27406/10 "2016-03-29T19:10:43Z")

</div>

[http://imgur.com/a/tQEj0](http://imgur.com/a/tQEj0)

I use this link  
`http://imgur.com/a/tQEj0` i get the first image, but i am not able to scroll over the images.

---

<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: [3월 30, 2016, 2:26오전 UTC](https://meta.discourse.org/t/til-discourse-can-embed-imgur-albums-and-galleries/27406/11 "2016-03-30T02:26:33Z")

</div>

Onebox does not support full Imgur Album embed, it only _indicates_ that the link is an Album.

---

<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: [3월 30, 2016, 2:35오전 UTC](https://meta.discourse.org/t/til-discourse-can-embed-imgur-albums-and-galleries/27406/12 "2016-03-30T02:35:18Z")

</div>

Looks a bit weird on iPad, the top bar is full width, but the image is not?

---

<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: [3월 30, 2016, 3:42오전 UTC](https://meta.discourse.org/t/til-discourse-can-embed-imgur-albums-and-galleries/27406/16 "2016-03-30T03:42:33Z")

</div>

I noticed that on my MacBook too. Fixed via:

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

and

[https://github.com/discourse/onebox/commit/97676311bcc3b850ea1cc10619365a9bbf1a917e](https://github.com/discourse/onebox/commit/97676311bcc3b850ea1cc10619365a9bbf1a917e)

---

<div class="post-metadata">

### Author: ![leo.proctor](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/leo.proctor/32/216158_2.png) [@leo.proctor](https://meta.discourse.org/u/leo.proctor)
#### Post date: [9월 18, 2017, 12:59오전 UTC](https://meta.discourse.org/t/til-discourse-can-embed-imgur-albums-and-galleries/27406/17 "2017-09-18T00:59:10Z")

</div>

This no longer works? It is throwing 404 error, and prints the url as it is  
[http://imgur.com/a/PWgY0?gallery](http://imgur.com/a/PWgY0?gallery)

![42 AM](https://global.discourse-cdn.com/meta/optimized/3X/c/7/c74300c4ee76f01c5abe9bf6eaac96fdca7e8ddb_2_690x19.png)

---

<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: [9월 18, 2017, 1:52오전 UTC](https://meta.discourse.org/t/til-discourse-can-embed-imgur-albums-and-galleries/27406/18 "2017-09-18T01:52:34Z")

</div>

Can you repro this @jomaxro?

---

<div class="post-metadata">

### Author: ![jomaxro](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jomaxro/32/126216_2.png) [@jomaxro](https://meta.discourse.org/u/jomaxro)
#### Post date: [9월 18, 2017, 1:56오전 UTC](https://meta.discourse.org/t/til-discourse-can-embed-imgur-albums-and-galleries/27406/19 "2017-09-18T01:56:00Z")

</div>

> [@codinghorror](#):
>
> Can you repro this

Yep, right here on Meta. Getting a raw link and a 404 console error.

[https://imgur.com/a/tQEj0](https://imgur.com/a/tQEj0)

cc @techAPJ

---

<div class="post-metadata">

### Author: ![gerhard](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/gerhard/32/119479_2.png) [@gerhard](https://meta.discourse.org/u/gerhard)
#### Post date: [9월 18, 2017, 2:25오후 UTC](https://meta.discourse.org/t/til-discourse-can-embed-imgur-albums-and-galleries/27406/21 "2017-09-18T14:25:13Z")

</div>

It’s fixed on latest.

[https://github.com/discourse/onebox/commit/85249fd81a68cd3073b438a56ad7d87d9d73cd58](https://github.com/discourse/onebox/commit/85249fd81a68cd3073b438a56ad7d87d9d73cd58)

---

<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: [12월 4, 2025, 11:35오전 UTC](https://meta.discourse.org/t/til-discourse-can-embed-imgur-albums-and-galleries/27406/22 "2025-12-04T11:35:51Z")

</div>


