5
2 Comments

Dynamically Rendering Social Sharing Images

After getting inspired by dynamically generated social sharing images that I've seen on IndieHackers, I decided to roll-up my sleeves ship this feature for Fizbuz. Here's a quick recap of what I had to build:

  1. I created a screenshot API that accepts a URL and uses chrome-aws-lambda & puppeteer to capture a screenshot and store it in S3.

  2. I created a special webpage to render a tl;dr version of a user's Fizbuz profile. This is the webpage that the screenshot API will request. Here's an example: https://fizbuz.com/u/carter/share

  3. When a Fizbuz user updates their profile, I invoke the /screenshot API:

await fetch(`/screenshot/${user.nickname}/share`)
  1. When someone shares a Fizbuz profile URL on a social platform, there are meta tags in the header that point at the preview image that was stored in S3:
<meta property="og:image" content="${imageUrl}" />
<meta name="twitter:image" content="${imageUrl}" /> 

That's it! ✨

https://fizbuz.com/u/carter

, Founder of Icon for Fizbuz
Fizbuz
on May 27, 2019
  1. 1

    Awesome feature. I really like dynamic previews. Do you measure impact of this feature on traffic acquired from social media platforms?

    1. 1

      Not yet. Honestly, a lot of my product roadmap includes best practices that I'm observing or learning about on other SaaS products.

Trending on Indie Hackers
From building client websites to launching my own SaaS — and why I stopped trusting GA4! User Avatar 38 comments The “Open → Do → Close” rule changed how I build tools User Avatar 31 comments I lost €50K to non-paying clients... so I built an AI contract tool. Now at 300 users, 0 MRR. User Avatar 23 comments Everyone is Using AI for Vibe Coding, but What You Really Need is Vibe UX User Avatar 22 comments Learning Rails at 48: Three Weeks from Product Owner to Solo Founder User Avatar 19 comments I built a tool that turns CSV exports into shareable dashboards User Avatar 18 comments