diff options
Diffstat (limited to 'vnext/src/utils')
-rw-r--r-- | vnext/src/utils/embed.js | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/vnext/src/utils/embed.js b/vnext/src/utils/embed.js index 7c1c5c3b..a538a1a8 100644 --- a/vnext/src/utils/embed.js +++ b/vnext/src/utils/embed.js @@ -290,9 +290,10 @@ function getEmbeddableLinkTypes() { re: /https?:\/\/www\.?instagram\.com(\/p\/\w+)\/?/i, makeNode: function(aNode, reResult, div) { let [, postId] = reResult - let mediaUrl = `https://instagr.am${postId}/media` - div.innerHTML = `<a href="${aNode.href}"><img src="${mediaUrl}"></a>` - return div + let iframeUrl = `https://www.instagram.com${postId}/embed/captioned/` + let iframe = makeIframe(iframeUrl, '100%', '480px') + iframe.onload = () => makeResizableToRatio(iframe, 1) + return setContent(div, iframe) } }, { |