4 ms·
Neat tool. A couple of suggestions: I'd make it fetch the meta tags and image using the user agent string of the services you're showing previews for. For exam
by matteason 2y ago
Neat tool. A couple of suggestions:
I'd make it fetch the meta tags and image using the user agent string of the services you're showing previews for. For example, Twitter/X fetches meta tags with a user agent string of Twitterbot/1.0. Some sites may serve different content to different services in order to optimise the image for display on that service.
It also looks like your API may not be looking at Twitter-specific meta tags [0], as it just returns one set of metadata that's used by every preview. For example on https://govukvue.org https://govukvue.org I use the 'summary' card format, which shows a small image with the name and description beside it. But your tool renders it as if it's a 'summary_large_image'.
[0] https://developer.x.com/en/docs/x-for-websites/cards/overview/markup https://developer.x.com/en/docs/x-for-websites/cards/overvie...
- fayazara 2y agoI'll make some improvements, laterally made it in like 2 hours. Thanks for the suggestions