====================================
How do you generate default avatars?
====================================

.. raw:: html

   <table class="provenance-header" style="border: 0; border-collapse: collapse; margin: 0 0 16px 0; width: 100%;">

.. raw:: html

   <tr style="border: 0;">

.. raw:: html

   <td style="border: 0; vertical-align: top; padding: 0 24px 0 0;">

..

   | **Source:**
     https://faq.remarkbox.com/cb1f36b6-ab5c-11e7-bf44-040140774501/how-do-you-generate-default-avatars
   | **Snapshot:** 2026-06-18T18:13:24Z
   | **Generator:** Remarkbox ``3053704``

   *This is a thread snapshot. The living document lives at the source
   URI above — it may have been edited, extended, or replied-to since.*

.. raw:: html

   </td>

.. raw:: html

   <td style="border: 0; vertical-align: top; width: 200px; text-align: right;">

.. figure:: data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAALQAAAC0AQAAAAAVtjufAAABsUlEQVR42tWYQW4DUQhDUS/A/W/pG1CemSwiZVPJXWQy6kRfEZ9vjM205uOl+pr1qmpN9T73R/Us/NTn66/rNT17d+8e2v34ugvJ+EVwp80x2gvh+OUDlBal+Zf4G5t7kVKn41/GQ3DKm8YfurxdYf5weYuBnjzhbRL/AhjBnk3cf5Pxpy/2wM9jaxYf6FlqI7NF3kaL4rO3zP/lJzSiD5LxyXw4AszR4r/bZPO3LFwHmJyd1R+iC1Yub9iLWifrKxPeYt0npdH6mvF+zGG1ShTOX0ZdZqYLEtWfxV1XXEox2E2UP3TUy8ZorzR/ZHkQBgM0NuVw/iBPZ5WFLov/Zm8LM0A0FzodjY+81WNe3i6bvzB1hBkruH6I4i8ayukj1kLrovoPdW6a20orrv8OaOeyyTw9HcWndT6zXmALjuKPX3mswojNpLj+I0Du3XIjSFn8KezcoOXjZP3X46a911I03iU8v/U5rzzJTbZ/PW4CvXWnlfZHz892xfLLiz/p95crMZ1w83Q6fnuIq5viVPn8EWi/3+Evcfxljnr+5xiaMH/qDObMxS9LWf5/7/8HfgE5YjyLR7eqWAAAAABJRU5ErkJggg==
   :alt: Scan for living source

   Scan for living source

.. raw:: html

   </td>

.. raw:: html

   </tr>

.. raw:: html

   </table>

I take the first two letters of the `randomly generated
username <https://faq.remarkbox.com/537e41bc-a1f5-11e7-9e83-040140774501/why-is-my-username-random-letters-and-numbers>`__
and use those as the initials. If you log into Remarkbox you may set
your username and optionally enable Gravatar from the `user
settings <https://faq.remarkbox.com/u/settings>`__ page.

The logic comes from
`invatar <https://github.com/russellballestrini/invatar>`__ which I
pulled into my codebase so that I may inline embed the SVG into an HTML
``img`` tag. All you have to do is "encode" or "quote" the SVG. For
example:
``<img src="data:image/svg+xml;charset=utf-8,encoded-svg-here">``

--------------

| **Source:**
  https://faq.remarkbox.com/cb1f36b6-ab5c-11e7-bf44-040140774501/how-do-you-generate-default-avatars
| **Snapshot:** 2026-06-18T18:13:24Z
| **Generator:** Remarkbox ``3053704``
