<b>Returns:</b> The generated image in png format.
</p>
<p>
<code>:makerid</code> - The ID of the Picrew maker you want to use. You can get this from the Picrew URL: <code>https://picrew.me/en/image_maker/000000</code>
</p>
<p>
<code>:hash</code> - Hex-encoded sha256 hash of the email address (or whatever other identifier you want to use).
</p>
<p>
<code>?gravatar=bool</code> - If this is set to <code>true</code> or <code>1</code>, and the provided hash belongs to an email on Gravatar that has a custom avatar set, a redirect to that avatar will be returned and no Picrew will be generated. Any other value will disable this behaviour.
<br/>
Note that this will slow down load times.
</p>
<h4id="api-from-email">Generate an image from an email address</h4>
<b><code>/generate/:makerid/:email</code></b>
<p>
<b>Returns:</b> a redirect to <code>/generate/:makerid/:hash</code>, where <code>:hash</code> is a sha256 hash created from the provided email address. This is useful when you don't have access to relevant APIs to generate a sha256 hash, such as on a vanilla JS website without external dependencies.
<br/>
Query parameters will be forwarded, so any parameters for <code>/generate/:makerid/:hash</code> are available.
If you plan on using this, please respect the copyright and license of the Picrew - it's not my job to enforce other people's copyright, so please be reasonable. I also recommend self-hosting this - a Dockerfile and example docker-compose config is provided in the repository.
</p>
<p>
This is a one-day side project of mine that I'll likely never touch again, but the source code is available <ahref="https://git.amogus.cloud/Lea/picvatar"target="_blank">here</a>. <br/>
Reverse engineering Picrew and trying to figure out how to use the available data to manually render images was a fun challenge, but it is nothing I intend to put long term maintenance into. If you find a bug, feel free to report it, but if Picrew completely changes their backend then I will likely not rewrite everything from scratch to accomodate that.