I would like to display a preview for http links that users could enter in my website.

Depending on the format/provider:

  • links for youtube and vimeo would display the vignette of the videos
  • audio links to spotify media would display album covers
  • link to images resources (imgur and al. and links ending in .jpg or .png) would display a thumbnail (or return the image that I would resize).

I know I can write this myself by parsing the url for the different providers but I would hope to use/contribute an existing javascript library (not unlike onebox that is unfortunantely written for Ruby).

Do you have a recommendation for such a library?

  • At least part of that is covered by Mousover Popup Image Viewer, which is a Greasemonkey/Tampermonkey/Violentmonkey userscript (and thus JavaScript). Works great at least for images – not sure for the rest. But you at least could base on that. Taking a look cannot hurt :)
    – Izzy
    Apr 8, 2015 at 13:23

1 Answer 1


I found many ways to preview those links.


It's protocol that must be implemented by the content provider (youtube, twitter...) so you can use a unified API

There are big names of board: flickr, youtube, vimeo, embedly, wordpress, scribd... but also it misses the big elephants in the room facebook, twitter...

oEmbed has bindings for jquery, java, .net, ruby, php - well basically everyone


Aimed at fixing the oEmbed limitations and bringing a lot more content providers into the fold: twitter, imgur, wikipedia...


A convenient solution that comes at a price (a free tier is available).

note I haven't used any this solutions yet, so I can't provide real world feedback.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.