When building Local Guides Ranking—a global leaderboard for Google Maps contributors—I wanted to give users a way to show off their stats on their own blogs and GitHub profiles. The requirement was simple: A live-updating badge that works everywhere. No iframes, no heavy JavaScript, just a clean image. The solution? Generating dynamic SVGs directly via PHP and serving them as standard images. Here is a breakdown of how I built it, the hurdles I faced, and how I solved them. 1. Gener...