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
I spent $0 on marketing and got 1,200 website visitors - Here's my exact playbook User Avatar 67 comments Veo 3.1 vs Sora 2: AI Video Generation in 2025 🎬🤖 User Avatar 31 comments I built eSIMKitStore — helping travelers stay online with instant QR-based eSIMs 🌍 User Avatar 21 comments 🚀 Get Your Brand Featured on FaceSeek User Avatar 20 comments Day 6 - Slow days as a solo founder User Avatar 16 comments Why I'm Done Juggling 10 SaaS Tools (And You Should Be Too) User Avatar 9 comments