Settings

Theme

Show HN: Programmable “link preview” thumbnails for your websites

thumbsmith.com

1 points by lot3oo 4 years ago · 2 comments

Reader

lot3ooOP 4 years ago

Hi HN,

I posted this a while back when I had just a small MVP and a had a little bit of feedback from here. A month of development later during Christmas, new years, and a lockdown, my first ever "API-like" service looks much more solid, and I would love to get some more honest feedback from the community here!

It's a tool that lets you easily add these dynamic "Link preview" thumbnails to your site's pages. This way, when links to your site are shared on the internet, a nice, on-brand, tailored picture can be shown instead of a generic image or nothing at all.

There is a really nice CLI based on vitejs you can try out to help with making the thumbnails.

How does it work ?

In short, you provide the service with some custom HTML/CSS templates, then a simple, public-facing "API" will be created for each template. This "API" will return rendered pictures of the templates dynamically based on the variables you prodive via query parameters - all in a scalable, production-ready way. You don't have to manage anything else.

Once you created and uploaded a template, you just need to "Hook up" the templates to your pages via meta tags in your site's <head>. You can use your framework / environment of choice to create the URL strings, passing variables to your templates via query string parameters.

Let me know what you think, thank you so much!

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection