# Onebox support for new Google Photos

**URL:** https://meta.discourse.org/t/onebox-support-for-new-google-photos/30106
**Category:** Feature
**Tags:** onebox
**Created:** [June 17, 2015, 12:49am UTC](https://meta.discourse.org/t/onebox-support-for-new-google-photos/30106 "2015-06-17T00:49:12Z")
**Posts on this page:** 19
**Page:** 1

<div class="post-metadata">

### Author: ![ky\_metro](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/ky_metro/32/42807_2.png) [@ky\_metro](https://meta.discourse.org/u/ky_metro)
#### Post date: [June 17, 2015, 12:49am UTC](https://meta.discourse.org/t/onebox-support-for-new-google-photos/30106/1 "2015-06-17T00:49:12Z")

</div>

Google+ Photos was a default for many of us with Android and Auto-Backup turned on… all your photos end up in one place online, free storage, etc etc… I’ve been in the habit of opening them on the Google page, and dragging the photo into Discourse. The photo URL _used to look_ something like this:

[https://lh3.googleusercontent.com/-DDzM12G2Qwc/VWlw-u8s6RI/AAAAAAABlio/PjSwWb\_IOJQ/w1556-h875-no/IMG\_20150529\_201713.jpg](https://lh3.googleusercontent.com/-DDzM12G2Qwc/VWlw-u8s6RI/AAAAAAABlio/PjSwWb_IOJQ/w1556-h875-no/IMG_20150529_201713.jpg)

This oneboxes just fine:

 ![IMG20150529201713](https://global.discourse-cdn.com/meta/original/4X/7/6/e/76ebc0e989bc41fc05ece3abc4ab4777a95f227d.jpeg)

Now we have Google Photos (they dropped the Plus)… and they’ve changed the way photo URLs work.

Same photo, new Google Photos URL:

 ![phrNeuu1TAmsKKKEALxECSZpxQFFWkP5mHcCBZG2hU=w1716-h965-no](https://global.discourse-cdn.com/meta/original/4X/6/4/1/6418669f2a6a460f0a60abfa0e725e3a43b731f6.jpeg)  
This will not onebox, as it’s not “.jpg” . I have no idea how to extract the raw jpg location from that string. It appears to be a completely different storage location and id, and contains photo size information at the end.

Can someone smarter than me please look into adding/fixing this?

---

<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: [June 17, 2015, 6:26pm UTC](https://meta.discourse.org/t/onebox-support-for-new-google-photos/30106/2 "2015-06-17T18:26:50Z")

</div>

Sure @techapj can you add this to your list?

---

<div class="post-metadata">

### Author: ![DeanMarkTaylor](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/deanmarktaylor/32/102462_2.png) [@DeanMarkTaylor](https://meta.discourse.org/u/DeanMarkTaylor)
#### Post date: [June 17, 2015, 9:32pm UTC](https://meta.discourse.org/t/onebox-support-for-new-google-photos/30106/3 "2015-06-17T21:32:03Z")

</div>

There might be a few things to consider here in terms of where users get their URL’s from.

Here are 4 links:

- Page URL when image is viewed as myself
  - [https://photos.google.com/photo/AF1QipMtn-OGRU9JOUmwnBFmPKNn3EZnbUvEc504\_1ez](https://photos.google.com/photo/AF1QipMtn-OGRU9JOUmwnBFmPKNn3EZnbUvEc504_1ez)
  - prompts for authentication when viewed as any other user.

- Get “Share” link from above page
  - [https://goo.gl/photos/kqi5hm6HdA5J9ksi7](https://goo.gl/photos/kqi5hm6HdA5J9ksi7)
  - Displays page, image, author, date and option to download.
  - It takes a few seconds for Google to generate this share URL when chosen.

- Direct image link
  - [https://lh3.googleusercontent.com/eTnYUj6Fw8jZL3YMxLMlGS1CqDoxxZ1tTDvAITi2SFA=w500-h333-no](https://lh3.googleusercontent.com/eTnYUj6Fw8jZL3YMxLMlGS1CqDoxxZ1tTDvAITi2SFA=w500-h333-no)
  - This is obtained by right clicking on the image and selecting “Copy image URL”
  - Raw image
  - Not sure I’d trust this to continue working in the future - no indications that this is a permalink. Guess it might be removed / moved in Google’s delivery network.

- Selecting 3 images and then selecting “Share”
  - [https://goo.gl/photos/KKiG8XvS4o9BXy2r9](https://goo.gl/photos/KKiG8XvS4o9BXy2r9)
  - Displays gallery page, multiple images, author, date and option to download.
  - Again takes a few seconds for Google to generate this share URL when chosen.

---

<div class="post-metadata">

### Author: ![Patrick\_David](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/patrick_david/32/119657_2.png) [@Patrick\_David](https://meta.discourse.org/u/Patrick_David)
#### Post date: [September 22, 2015, 1:55pm UTC](https://meta.discourse.org/t/onebox-support-for-new-google-photos/30106/4 "2015-09-22T13:55:06Z")

</div>

Just checking in to see if there’s been any movement on this? I recently ran into the same problem for a user.

---

<div class="post-metadata">

### Author: ![lrossouw](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/lrossouw/32/121275_2.png) [@lrossouw](https://meta.discourse.org/u/lrossouw)
#### Post date: [July 22, 2016, 11:43am UTC](https://meta.discourse.org/t/onebox-support-for-new-google-photos/30106/5 "2016-07-22T11:43:54Z")

</div>

It would be great if we can get these `https://goo.gl/photos/KKiG8XvS4o9BXy2r9` style links oneboxed. Both the photo and gallery versions.

---

<div class="post-metadata">

### Author: ![cpradio](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/cpradio/32/4970_2.png) [@cpradio](https://meta.discourse.org/u/cpradio)
#### Post date: [July 22, 2016, 12:14pm UTC](https://meta.discourse.org/t/onebox-support-for-new-google-photos/30106/6 "2016-07-22T12:14:25Z")

</div>

Thank link doesn’t seem to work for me, can you paste a working version in [Generate responsive embed codes - Iframely](https://iframely.com/embed) to see if it is even supported? (particularly for gallery versions)

---

<div class="post-metadata">

### Author: ![lrossouw](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/lrossouw/32/121275_2.png) [@lrossouw](https://meta.discourse.org/u/lrossouw)
#### Post date: [July 22, 2016, 1:34pm UTC](https://meta.discourse.org/t/onebox-support-for-new-google-photos/30106/7 "2016-07-22T13:34:26Z")

</div>

Cool they seem to work actually. I added goo.gl to my site’s onebox settings and they work now. I don’t know why I thought I didn’t need to do that.

I also edited the link as I copied one of the ones above but with the link count number at the end by mistake.

---

<div class="post-metadata">

### Author: ![lrossouw](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/lrossouw/32/121275_2.png) [@lrossouw](https://meta.discourse.org/u/lrossouw)
#### Post date: [July 22, 2016, 2:00pm UTC](https://meta.discourse.org/t/onebox-support-for-new-google-photos/30106/8 "2016-07-22T14:00:57Z")

</div>

Only drawback it seems is that Google shows only the top of portrait images.

---

<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: [July 22, 2016, 7:30pm UTC](https://meta.discourse.org/t/onebox-support-for-new-google-photos/30106/9 "2016-07-22T19:30:01Z")

</div>

There is no way URL shorteners would be expected to work here. None whatsoever.

---

<div class="post-metadata">

### Author: ![lrossouw](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/lrossouw/32/121275_2.png) [@lrossouw](https://meta.discourse.org/u/lrossouw)
#### Post date: [July 23, 2016, 1:29am UTC](https://meta.discourse.org/t/onebox-support-for-new-google-photos/30106/10 "2016-07-23T01:29:06Z")

</div>

It does work if you whitelist goo.gl. Also if you share a photo from Google Photos it generates a special goo.gl link (similar to the maps specific one) that’s just for photos. So it’s not a standard shortened link. On my site I white-listed goo.gl and if you post this link it puts the photo in.

Only problem is that portrait mode photos are cut-off. But I think that’s something wrong on Google’s end.

See this:

> **[Iframely URL Debugger - Open Graph, Twitter Cards, oEmbed](https://debug.iframely.com?uri=https%3A%2F%2Fgoo.gl%2Fphotos%2FgviT7KkEkKv2BKdJ7)**
>
> Check your URL against Open Graph, Twitter Cards, oEmbed specs. See what other apps see.

That photo should look like this, but it’s only showing the top part.

 ![](https://global.discourse-cdn.com/meta/original/3X/d/e/de169cccad65ca5a7e81f58cbf256537805b2cfb.png)

---

<div class="post-metadata">

### Author: ![cpradio](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/cpradio/32/4970_2.png) [@cpradio](https://meta.discourse.org/u/cpradio)
#### Post date: [July 23, 2016, 3:37am UTC](https://meta.discourse.org/t/onebox-support-for-new-google-photos/30106/11 "2016-07-23T03:37:04Z")

</div>

> [@lrossouw](#):
>
> But I think that’s something wrong on Google’s end.

You would be correct. If you look at the meta tags they generate, it links to a photo that only shows the top portion of the portrait photo

---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [October 13, 2017, 5:12am UTC](https://meta.discourse.org/t/onebox-support-for-new-google-photos/30106/12 "2017-10-13T05:12:59Z")

</div>

We covered this in another topic, the pain here is that our “onebox any image” code depends on file extension instead of doing a HEAD/GET and pulling out the mime type.

I think we should just bite the bullet here and look at mime types cause it cleans up a bunch of places where this is the case.

(note, slack does this)

---

<div class="post-metadata">

### Author: ![omarfilip](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/omarfilip/32/208019_2.png) [@omarfilip](https://meta.discourse.org/u/omarfilip)
#### Post date: [March 20, 2018, 6:04pm UTC](https://meta.discourse.org/t/onebox-support-for-new-google-photos/30106/13 "2018-03-20T18:04:00Z")

</div>

Seeing how Instagram oneboxing is working nicely, any chance the same could be applied to Google Photos albums?

> [@Instagram oneboxing](https://meta.discourse.org/t/instagram-oneboxing/69099):
>
> Continuing the discussion from [Onebox Twitter embedding](https://meta.discourse.org/t/onebox-twitter-embedding/18943/20): There is an issue with Instagram embedding for which there is no topic to my surprise. I only found this comment by @Apreche written in January. This is actually causing quite a lot of confusion among users. They post an URL to its own line but instead of a link, they see an image in their post. Is there any way to improve this behaviour?

Here is the link that Google produces for sharing an album with 3 photos in it:

[https://photos.app.goo.gl/OPDpevnR0XUHTqA33](https://photos.app.goo.gl/OPDpevnR0XUHTqA33)

 ![26%20AM](https://global.discourse-cdn.com/meta/original/3X/9/d/9d02927166373a86edd8f812b0b3c1ce81ed0180.jpg)

And here is how a Google Photos album with 3 photos is presented in Discourse:

[![Google Photos](https://global.discourse-cdn.com/meta/original/4X/b/5/4/b54d47649807c53c8bdbc67cf89750b0fccf06e5.jpeg "Pike") ](https://photos.google.com/share/AF1QipO8oeS1WeGACM0BPRW5auzqlSg3qvJKPLA9iT7B1iAQ1oPzJWSj5pKcgmHTB8dePw?key=VTlrMXRvUm12d1ZybmVtSkYydENuUVRjV2RRdzZR)

---

<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 21, 2018, 4:59am UTC](https://meta.discourse.org/t/onebox-support-for-new-google-photos/30106/14 "2018-03-21T04:59:56Z")

</div>

I don’t see that used as much as Instagram, so it isn’t as much of a priority.

---

<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: [November 10, 2018, 6:23am UTC](https://meta.discourse.org/t/onebox-support-for-new-google-photos/30106/16 "2018-11-10T06:23:22Z")

</div>

Onebox [now](https://github.com/discourse/onebox/commit/566056a343461432e5606c77b458eab5c89c130d) has a dedicated engine for Google Photos to support album, image and video links. Demo:

Album:

[https://photos.app.goo.gl/pXA7T8zBX4WZWVMT7](https://photos.app.goo.gl/pXA7T8zBX4WZWVMT7)

Image:

[https://photos.app.goo.gl/GrJbrCUDUw6JUUSv8](https://photos.app.goo.gl/GrJbrCUDUw6JUUSv8)

Video:

[https://photos.app.goo.gl/hmqzFFyVHxZ91FCo9](https://photos.app.goo.gl/hmqzFFyVHxZ91FCo9)

---

<div class="post-metadata">

### Author: ![ky\_metro](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/ky_metro/32/42807_2.png) [@ky\_metro](https://meta.discourse.org/u/ky_metro)
#### Post date: [December 20, 2018, 6:23pm UTC](https://meta.discourse.org/t/onebox-support-for-new-google-photos/30106/26 "2018-12-20T18:23:39Z")

</div>

That is AWESOME. Thank you!!

---

<div class="post-metadata">

### Author: ![danekhollas](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/danekhollas/32/79637_2.png) [@danekhollas](https://meta.discourse.org/u/danekhollas)
#### Post date: [April 13, 2019, 8:21pm UTC](https://meta.discourse.org/t/onebox-support-for-new-google-photos/30106/27 "2019-04-13T20:21:47Z")

</div>

It seems that the Onebox is cropping the image in my case. Am I doing something wrong?

[https://photos.app.goo.gl/1j3E4exAQUeBSDEn7](https://photos.app.goo.gl/1j3E4exAQUeBSDEn7)

Onebox  
[![Google Photos](https://global.discourse-cdn.com/meta/original/4X/5/f/9/5f986d9573baf1bcaf35759530e8081c0ad31d7c.jpeg "New photo · Saturday, Apr 6, 2019 📸") ](https://photos.google.com/share/AF1QipM0O-LQWRA9QR3sOpHh3muGGpfEsNRM_lIJNplLFK_b1OfXaS3zbrwPvucR0cjflA?key=bkx1YmxLM0I0RTlJcC1rZmxIbzZTVEs1X0JsX05R)

Full image

 ![image](https://global.discourse-cdn.com/meta/original/3X/2/7/272fa120401bb156ea712afcca47aff292a85abf.jpeg)

---

<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 25, 2019, 6:13am UTC](https://meta.discourse.org/t/onebox-support-for-new-google-photos/30106/28 "2019-04-25T06:13:16Z")

</div>

Onebox uses `og:image` tag to get image link and in above case the cropped image is what Google is linking to as per:

```plaintext
<meta property="og:image" content="https://lh3.googleusercontent.com/6nA9fLdVMC1TzVwZbLYSRW7LUGoe8Gm9kQ_eKktYVALvfULRzYwbd2l4tb54oUG_khyUJuP16Dha1muAT7fAKssGBcqHiFXDwlBVRvvrajaJ2Xy2hJ8HusnoHj1vnDZa3XhzW1ORZsa11AnG_zRfOii8ejgoA9SsobPJXoO3xBq9M7CDPzrOkHHhzG50bslo0FeHhN5S8TrHXmykxLSerV1879tiFo4VrvafHGyRI6iHLjaZvXVNWd-VlD58bM7lgvefBoJe8YlYCGL67cqmcL7XCRjutf6c0jKq7lY0nI9q3nZTDXssgnrvHT-jt0cLzkA8r-ODBtGG9-zhuhTpZqSS4CBsduVckZLtS8wbBPXriyWq7bWn9joynQd-vqgTLj6qdpQqCif62OZclPYr2IO4pOiAK6Fcuns6eMiEYFvv4A1DHu-9ZQ7YMkZqRjNUT8tei0pTmqw7pKUMIEqD21xFiCtF4r3rI3YiO94EaKyJZW2lNAOnIieSPG_n0sdYYT4ciCj0yGbVbdwqaF8Fq77o2AENiFhp8VVqfYbKPtt8PvAdZsoSdpasdVafkxLIPD1iGlkiMljXX9-BpjZGeUNKeLBbHp--IRi3wnbal-3OW6GxwO_H_bmed2xa8hXGfwcbyzmWS35FkkXClZhVnbWyePrYXM298Bhft5C-OZSl0R-OuGiC6rmM52Z_wWfx5njtwWIu_Xuyr35TQqAvroPi=w600-h315-p-k">

```

No image cropping is happening on discourse/onebox side.

---

<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:36am UTC](https://meta.discourse.org/t/onebox-support-for-new-google-photos/30106/29 "2025-12-04T11:36:01Z")

</div>


