Use a default gravatar if one cannot be fetched
diff --git a/server/endpoints/gravatar.py b/server/endpoints/gravatar.py
index e5a4b97..d8311d7 100644
--- a/server/endpoints/gravatar.py
+++ b/server/endpoints/gravatar.py
@@ -20,6 +20,7 @@
 import plugins.server
 import aiohttp
 import aiohttp.web
+import base64
 import string
 
 CACHE_LIMIT = 25000  # Store a maximum of 25,000 gravatars in memory at any given time (25k x 5kb ≃125mb)
@@ -27,7 +28,34 @@
 
 gravatars = []
 gravatar_cache = {}
-
+gravatar_default = base64.b64decode("""\
+/9j/4AAQSkZJRgABAQEAYABgAAD//gA7Q1JFQVRPUjogZ2QtanBlZyB2MS4wICh1c2luZyBJSkcgSlB
+FRyB2NjIpLCBxdWFsaXR5ID0gOTAK/9sAQwADAgIDAgIDAwMDBAMDBAUIBQUEBAUKBwcGCAwKDAwLCg
+sLDQ4SEA0OEQ4LCxAWEBETFBUVFQwPFxgWFBgSFBUU/9sAQwEDBAQFBAUJBQUJFA0LDRQUFBQUFBQUF
+BQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQU/8AAEQgAYABgAwEiAAIRAQMR
+Af/EAB8AAAEFAQEBAQEBAAAAAAAAAAABAgMEBQYHCAkKC//EALUQAAIBAwMCBAMFBQQEAAABfQECAwA
+EEQUSITFBBhNRYQcicRQygZGhCCNCscEVUtHwJDNicoIJChYXGBkaJSYnKCkqNDU2Nzg5OkNERUZHSE
+lKU1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6g4SFhoeIiYqSk5SVlpeYmZqio6Slpqeoqaqys7S1tre4u
+brCw8TFxsfIycrS09TV1tfY2drh4uPk5ebn6Onq8fLz9PX29/j5+v/EAB8BAAMBAQEBAQEBAQEAAAAA
+AAABAgMEBQYHCAkKC//EALURAAIBAgQEAwQHBQQEAAECdwABAgMRBAUhMQYSQVEHYXETIjKBCBRCkaG
+xwQkjM1LwFWJy0QoWJDThJfEXGBkaJicoKSo1Njc4OTpDREVGR0hJS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P4Y1R
+7Wb54z80UuOHX/H1FfQP+etc9458OL4j0OWNFBu4QZID3yOq/iOPyoA8HooIwaKAE7V0PgLShq/iqyi
+dd0Ubec49l5/ngfjXPGvQ/g3bB9U1G4xzHEqA/7xz/7LQB6xRSUUALRSf56UUALRSUf56UALRSUUAeD
+ePNKGkeKb2JF2xSN5yD2bn+eR+Fc/Xofxktgmp6fcY5khZCf905/9mrzygD//2Q==
+""")
 
 async def fetch_gravatar(gid: str) -> None:
     headers = {"User-Agent": "Pony Mail Agent/0.1"}
@@ -73,13 +101,13 @@
             to_pop = gravatars.pop(0)
             del gravatar_cache[to_pop]
     # if in cache, serve it.
+    headers = {
+      "Cache-Control": "max-age=86400",  # Expire gravatar in one day
+    }
     if is_valid_md5 and gid in gravatars:
         img = gravatar_cache[gid]
-        headers = {
-          "Cache-Control": "max-age=86400",  # Expire gravatar in one day
-        }
         return aiohttp.web.Response(headers=headers, content_type="image/png", body=img)
-    return aiohttp.web.Response(content_type="text/plain", body="Could not fetch gravatar")
+    return aiohttp.web.Response(headers=headers, content_type="image/png", body=gravatar_default)
 
 
 def register(server: plugins.server.BaseServer):