How to turn URLs into rich media embeds?

Dear Grav community,

I decided to launch my private portfolio website by using Grav. Since this is a private project and I’m learning HTML, CSS, PHP etc. as an autodidact, a lot of the first steps with Grav are based on trial and error.

My plan is to have a one pager website with one specific section, where I present third party links to my works. Do you have any advice, how I can show these URLs as rich media embeds? To be more precise: I’d like to grab the meta information of the websites and show title, description, header image etc. as rich media embeds (like Facebook or Instagram posts for example). There are services like already existing for such cases. However, there are limitations when it comes to the styling.

Maybe there is a plug-in around which I didn’t find yet or you guys have some further tips for me on how to realize this idea.

Best regards!

Hi @thrstk, and welcome to Grav Family :wink:
When you visit official plugins catalogue and search for “embed”, you’ll find some examples of what you need.

Hope this helps! :slight_smile:

Hey MakaryGo,

thanks for your fast reply! I already skimmed through the plugins section yesterday but didn’t find a fitting extension right away. I only find the possibility to present rich media embeds for YouTube. In my case, I’m looking for a tool which presents not only Instagram, Facebook, Youtube etc. but any given URL as rich media content. I wrote some articles recently and would like to embed visually appealing links to these websites within my landing page.

Kind regards!

  1. Not sure it’s active, but seems most versatile, may be a good point to start learning:
  2. Another rather versatile plugin, again not sure if still supported, but I used it a few years ago, and was really happy with it:
    Also, I believe that author is here on the forum, perhaps he’d be able to give you some guidance :slight_smile: @Sommerregen
  3. Probably one of my fav plugins of all time, using really cool text processing library, TextFormatter. Among other cool things, also creates auto embeds, and also was created by Sommerregen!
  4. I never actually gave it a try, but the idea is really interesting - this one does not rewrite links to use provider’s iframe code, but fetches the content itself. Again, I didn’t try it, but it seems logical that this kind of approach can be really versatile and possibly easier to hack:
    Another approach worth looking into IMO would be looking into the Shortcode plugins:
    It is easily extendable, and really well documented :wink:
    Also, if you want really universal solution, I’d suggest creating a plugin that makes use of the oEmbed format, as it is almost standard, among many others used by all Wordpress-based websites.

So, good luck and fingers crossed :wink: