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 built a tool directory that doesn't pretend every founder has the same needs User Avatar 62 comments Drop your landing page URL. I'll use Ferguson to tell you why visitors might be leaving User Avatar 50 comments AI helped me ship faster. Then I forgot what my product actually does. User Avatar 37 comments I Was Picking the Wrong SaaS Tools for Two Years. Here's the Mistake I Finally Figured Out. User Avatar 35 comments Most early-stage SaaS companies miss churn signals — here’s how to catch them early User Avatar 29 comments How I Run a 1.7M Product Search Engine at 66ms on a $0 Hosting Budget User Avatar 19 comments