This is a very small bit of code to encode image.Image to JSON and HTML for TOTP QR code, inspired by how GitHub delivers TOTP QR codes.
Why? Because you never want the image just sitting around and you definitely don't want to be sending keys to some third party API like some authentication providers I won't mention.