Onebox support for new Google Photos


(Chris Saenz) #1

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:

This oneboxes just fine:

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

Same photo, new Google Photos URL:

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?

(Jeff Atwood) #2

Sure @techapj can you add this to your list?

(Dean Taylor) #3

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

Here are 4 links:

(Pat David) #4

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

(Louis Rossouw) #5

It would be great if we can get these style links oneboxed. Both the photo and gallery versions.

(cpradio) #6

Thank link doesn’t seem to work for me, can you paste a working version in Generate Responsive Embed Codes via Iframely to see if it is even supported? (particularly for gallery versions)

(Louis Rossouw) #7

Cool they seem to work actually. I added 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.

(Louis Rossouw) #8

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

(Jeff Atwood) #9

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

(Louis Rossouw) #10

It does work if you whitelist Also if you share a photo from Google Photos it generates a special 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 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:

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

(cpradio) #11

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

(Sam Saffron) #12

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)


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

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

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

(Jeff Atwood) #14

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

(Arpit Jalan) #16

Onebox now has a dedicated engine for Google Photos to support album, image and video links. Demo:




Google Photos

(Chris Saenz) #26

That is AWESOME. Thank you!!