No more need for hacky workarounds or third-party solutions to put an Instagram photo or video on your website, we’re told:
Now, when you visit an Instagram photo or video page on your desktop web browser, you’ll see a new share button on the right side of your photo (just under the comments button). Click the button to see the embed code. Copy the block of text it gives you and paste it into your blog, website or article. When you hit publish, the photo or video will appear.
There’s one way, though, in which it’s not particularly publisher friendly. Unlike, say, a YouTube embed, there’s no option on the embed code to set the width of your content well — it just defaults to 612 pixels wide. (Instagram’s web interface uses that size.)
But 612 pixels is too wide for lots of publishers’ sites. For instance, the well on this Nieman Lab post is 570 pixels, so this pic from New Orleans Saints free safety Malcolm Jenkins extends into the right sidebar by 42 pixels:
Not a great crime, but annoying. (Would be more than annoying if we had, say, a 400-pixel well.)
Compare that to, say, a Twitter embed, which will automatically constrict its size (and reflow its content) at smaller widths — as in the second tweet embed below, which I’ve artificially confined to a 300-pixel box:
Introducing Instagram Web Embeds http://t.co/Vaq0hty5ix
— Instagram (@instagram) July 10, 2013
Introducing Instagram Web Embeds http://t.co/Vaq0hty5ix
— Instagram (@instagram) July 10, 2013
You can work around this by manually changing the width attribute on an Instagram embed’s iframe. That works okay at larger widths — here’s 570px, 400px, and 312px:
But you’ll end up with awkward whitespace underneath the embed unless you also manually change the iframe’s height, which I’ve done here. The formula is height = width + 98px. So a 400px wide embed should be 498px tall.
But trial and error indicates that sort of manipulation still only works down to 312px in width. Below that, the iframe warps and won’t maintain the famous square aspect ratio of an Instagram photo. Here’s 200px × 298px:
So I guess we’ll still need hacky solutions after all. (If you’re desperate, you can always just use the actual raw photo, although Instagram would probably rather you not.)
In the meantime, just add easy Creative Commons licensing options to photos, Instagram, and all will be forgiven.
UPDATE: Friend-of-the-Lab Jeff Hobbs reminds me of the biggest problem with Instagram’s embeds: They won’t cooperate with responsive layouts. If you’re using media queries to fit a site into (say) the iPhone’s 320px width, a 612px Instagram embed will screw up your layout. (The same is true for YouTube embeds, but you can get around that by using FitVids.js or something similar.)
But he has a solution! Create a custom Instagram embed at his site Embed Responsively. (Here’s an example of what it produces; narrow your browser width to see the responsiveness in action.) Jeff’s site will also make responsive-friendly custom embeds for YouTube, Vimeo, Google Maps, and more — check it out.
14 comments:
Yo dawg I heard you like pixels
http://www.niemanlab.org/images/yo-dawg-malcolm-jenkins.jpg
Any suggestions for how to embed photos full Instagram size on Facebook?
I don’t think any of these embed codes (iframes) would work on Facebook. Probably best pasting in the Instagram URL and letting FB do the work.
lolol
(Sorry don’t check Disqus comments very often)
But what if you replace the with value with “100%”? It should automatically adapt to any frame size… #HackySolutions
But that leaves the height — you’ll either have random excess whitespace on bottom or cut off a piece of the embed. You can’t do width=100% and height=auto with iframes the way you can with images because images have a native aspect ratio and iframes don’t.
We’re one of those 3rd party tools focusing on publishers that want to crowdsource photos and videos from Instagram.
I just want to say that i totally love the http://embedresponsively.com/ site with Instagrams. It looks very beautiful and behaves awesome.
(shameless plug)
At shootitlive we’re solving another demand for publishers, where they want to source alot of Instagrams and quickly publish them on their site (as they appear on Instagram) and they need to be able to choose what to publish.
If you like to try it out, it’s free to use (and ad-free) http://shootitlive.com/instagram-for-publishers/
except your Instagram embed leaves a whole load of whitespace at the bottom of the pic, even on your website. So good but not great.
Hey Scott, see here how the instagrams fill out every pixel w/o whitespace http://shared.shootitlive.com/instagram.html
There is certainly a great deal to learn about this subject. I love all of the points you have made.
It’s a pity you don’t have a donate button! I’d most certainly donate to this superb blog! I guess for now i’ll settle for book-marking and adding your RSS feed to my Google account. I look forward to brand new updates and will talk about this blog with my Facebook group. Talk soon!
You really make it seem so easy with your presentation but I find this topic to be actually something which I think I would never understand. It seems too complicated and extremely broad for me. I am looking forward for your next post, I will try to get the hang of it!
One other thing to point out is that an online business administration training is designed for learners to be able to smoothly proceed to bachelor degree courses. The Ninety credit college degree meets the lower bachelor diploma requirements then when you earn your own associate of arts in BA online, you should have access to up to date technologies in this field. Some reasons why students want to get their associate degree in business is because they can be interested in this area and want to obtain the general education and learning necessary just before jumping right bachelor education program. Many thanks for the tips you really provide within your blog.
Trackbacks:
Leave a comment