Instagram Single Photo Bookmarklet

Extract the permalink, photo jpg URL, and photo caption to copy them into a text note

Ever wanted a simple and quick way to extract the primary details from an Instagram photo to put it on your own website?

The following javascript-based bookmarklet is courtesy of Tantek Çelik as an Indieweb tool he built at IndieWebCamp NYC2:

If you view a single photo permalink page, the following bookmarklet will extract the permalink (trimmed), photo jpg URL, and photo caption and copy them into a text note, suitable for posting as a photo that’s auto-linked:

javascript:n=document.images.length-1;s=document.images[n].src;s=s.split('?');s=s[0];u=document.location.toString().substring(0,39);prompt('Choose "Copy ⌘C" to copy photo post:',s+' '+u+'\n'+document.images[n].alt.toString().replace(RegExp(/\.\n(\.\n)+/),'\n'))

Any questions, let me know! –Tantek

If you want an easy drag-and-drop version, just drag the button below into your browser’s bookmark bar.

✁ Instagram

Editor’s note: Though we’ll try to keep the code in this bookmarklet updated, the most recent version can be found on the Indieweb wiki thought the link above.

Syndicated copies to:

8 responses on “Instagram Single Photo Bookmarklet”

Reposts

  • shyduroff

Mentions

  • Tantek Çelik

Leave a Reply

Your email address will not be published. Required fields are marked *

To respond on your own website, enter the URL of your response which should contain a link to this post's permalink URL. Your response will then appear (possibly after moderation) on this page. Want to update or remove your response? Update or delete your post and re-enter your post's URL again. (Learn More)