Following the discussion at the topic What all cool stuff can hugo + colly do? I discovered that there is an Opengraph Server written in Go that retrieves Open Graph data from websites and returns them as JSON.
I just installed Opengraph Server and tested it. It works beautifully with Instagram, Vimeo, YouTube, Twitter and even Speaker Deck.
Retrieving the Open Graph meta tags exposes more useful information than the official oEmbed APIs of these services.
I am proposing a Hugo
getOpenGraph function so that the Open Graph Data can be retrieved from within Hugo and saved in the /data/ folder as JSON objects to be consumed by Hugo’s internal shortcodes.
For example the Open Graph data of an Instagram post located at
https://www.instagram.com/p/BWNjjyYFxVx/ could be saved under
Basically the ID of the various media will be used as the JSON filename.
The bonus points with such an approach are that the photo URLs exposed by Instagram through Open Graph do not expire unlike the ones exposed by the official oEmbed API.
This would be an amazing feature and it would greatly assist us with creating Hugo Internal shortcodes that are GDPR compliant and respect users’ privacy.