Ok, spent some time on this late last night, and the good news is that itโs finished, and ready for you to try out.
Please do remember that this isnโt a plugin, but a client side js
function with a server side proxy. However, donโt be put off as the installation is simple, and you should be up and running in around 30 minutes maximum.
It does require some technical knowledge and ability, but if youโve setup NodeBB, then you can do this easily - besides, there will be full documentation so you are taken through each step.
Some other points to note are that not every site returns valid Open Graph data - in fact, some donโt even return an image (yes, Reddit, Iโm taking about you) when they are closed to the public, or behind a registration form / membership grant, or in some cases, a paywall.
When this scenario is met, the problem arises that no valid image is being returned. I did toy with the idea of using a free random image API , and even wrote the code for it - then realised nature scenery didnโt quite align with a tech site like Reddit.
Ok - the only thing to do here is to generate your own image then, and bundle that in with the proxy. For this purpose, I chose an image (I have a subscription to stockphotosecrets.com, which is an annual cost to me. Iโve cancelled the subscription as I donโt use it, but provided I downloaded the image before the term expires, I have the right to use any images after the fact) and then added some text parts to it so that it could then be used as a placeholder for when the image is absent.
Hereโs that image
Itโs sparse, but functional. And given my comment earlier around membership and paywalls, hereโs what that specific scenario would look like when encountered
Before I go ahead and provide the documentation, code, and proxy server, Iโd recommend you try out the latest code on sudonix.dev.
Enjoy.