Image support may be degraded on certain browsers. Browsers like Safari & Firefox tend to work best. Images should stay around 10KB.


Using Data URIs, you can send images through the Message API. You can do a quick proof of concept in your bot in a few seconds. Both of the examples below are covered in the tutorial video above.

From a static image

  1. Find an image you want to use
  2. Use this tool by ezgif to convert your image to a Data URI

Convert image to data URI

  1. Set the Include tags for option to Nothing , generate the data URI, and then choose Select All so you can copy paste

Get data URI

  1. Paste the URI into the Message Tester

Data URI in Message Tester

  1. Use the Message Tester to send yourself the image.
  2. Enjoy your new image support!

From an image file

  1. Base64 encode your image.
with open("my_awesome_image.jpeg", "rb") as img_file:
    b64_string = base64.b64encode('utf-8')
  1. Format your Data URI.
data_uri = f'data:image/jpeg;base64,{b64_string}'
  1. Use the Message Tester to pre-format a template message for your API call.
message = f"Looks like you forgot your badge. Here's <a href=\"{data_uri}\">a QR code badge</a> for the day."
  1. Send yourself a message using our code-generator tools ,
payload = {
  "message": message,
  "recipients": [

headers = {
  "Content-Type": "application/json",
  "Authorization": f"Bearer {API_KEY}"

response =, json=payload, headers=headers)
  1. Enjoy your new image support!