Instagram oneboxing

(Jeff Atwood) #68

Looks like my original theory was correct

(Arpit Jalan) #69

I will make it so that instagram image and video url are treated as same and will show video preview image instead of mp4 video. Since we download onebox images locally the image will keep working. For example, the preview image for instagram video link @codinghorror posted above will be:

(Richie Rich) #70

Excellent workaround!!

So I’m guessing people then click on the preview image and it takes them off to the video/link over on Instagram?

Sounds ideal :+1:

(Arpit Jalan) #71

Yep. See it in action here:

(rizka) #72

Thank you for taking the action to fix this.

Question: any ideas to make it look like a video? It might not always be so evident.

(David Taylor) #73

@techAPJ this makes the scrolling jump around for me - I think we need to add a fixed height when embedding the image.

(Richie Rich) #74

Amazing :smiley:

Some kind of font awesome fa-play graphic over the top of the image perhaps?

(Richie Rich) #75

@techAPJ has that code change been committed?

(Arpit Jalan) #76

Not sure… maybe the title can indicate that the linked post is a video, like:

[Video] National Geographic on Instagram

This should not be happening. The image have fixed width/height and there are other (generic) safeguards in place. I’ll check.

Yes, the changes have been committed.

(Richie Rich) #77

Thanks for the super-fast response to this one guys!

I’ve just installed the latest v2.1.0.beta5 +111 :+1:

(Richie Rich) #78

Hmmm :thinking:

Do I need to do something to implement this on all existing affected posts?

Rebake existing posts perhaps?

(David Taylor) #79

Yes, if it’s just a few posts, click the :wrench: on the post and then “rebuild HTML”.

(Jeff Atwood) #80

Just superimpose a play button at the lower right, @awesomerobot recently made a change for this on images that are click to expand, please check with him if you need guidance.

(Arpit Jalan) #81

Excellent idea! Done.


EDIT: Just noticed that play icon is not clickable, making it so now Done.

(Richie Rich) #82

What a fantastic set of solutions!

People can see now it’s a video at a glance too.

Great work everyone, thanks for the amazingly quick response to this issue too :clap:

(Matt Sephton) #83

Awesome work on this.

My only request is if there is a way to make the onebox mention my Instagram account name a little less?

For me the most important part is the image so I’d appreciate a way to somehow hide at least the “Account Name on Instagram” heading (the link leads to the linked page) and perhaps even the caption?

(Jeff Atwood) #84

This is probably easiest accomplished via a local CSS customization, under Admin, Customize. You could hide or de-size the element through standard CSS.


I do agree that the “on Instagram” part is redundant though @techapj… we’re saying it twice, and everyone knows how I feel about needless repeated text :wink:

(Arpit Jalan) #85

Fixed in

(Matt Sephton) #86

How about the top becomes So much neater.

Also “Matt Sephton (@mattsephton) on Instagram” at the start of the caption also feels needlessly repetitive.

As for local CSS, is that per user or globally for a board? Because I’m not admin of any boards.

(rizka) #87

I noticed something about URL parsing. Oneboxing fails and produces just the image if the URL contains the Instagram username.

This won’t work as intended:

1,079 Likes, 25 Comments - Benny Blood (@bennyblood24) on Instagram: “Defense. ☺️”

This works: