Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
PHP script (using GD) to generate avatar or skin from a Minecraft username
branch: master
Failed to load latest commit information.
.htaccess Closes #5 by adding ability to specify view
LICENSE.md Updated license to MIT
README.md Fixed default skin URL
composer.json Beautified JSON
face.php Closes #7
skin.php Added output of Alex skin

README.md

Minecraft Avatar

PHP/GD creation of a Minecraft facial avatar or full skin preview based on a given username, constructed from their Minecraft skin.

If username is not found, then it uses the default Steve skin: https://minecraft.net/images/steve.png

Facial Avatar

Steve Avatar Alex Avatar

<img src='face.php?u={username}&s={size}&v={view}' />

Query Parameters

Key Example Value Default Description
u jamiebicknell steve Username of Minecraft player
s 8 - 250 48 Desired avatar width and height
v f, l, r, b
front, left, right, back
front View of facial avatar (optional)

Skin Preview

Steve Skin

Alex Skin

<img src='skin.php?u={username}&s={size}' />

Query Parameters

Key Example Value Default Description
u jamiebicknell steve Username of Minecraft player
s 40 - 800 250 Desired skin preview width

.Htaccess

If you have mod_rewrite enabled you can view the avatar via cleaner URLs.

Facial Avatar

<img src='http://domain.com/avatar/{username}' />
<img src='http://domain.com/avatar/{username}/{size}' />
<img src='http://domain.com/avatar/{username}/{view}' />
<img src='http://domain.com/avatar/{username}/{size}/{view}' />

Skin Preview

<img src='http://domain.com/skin/{username}' />
<img src='http://domain.com/skin/{username}/{size}' />

Notes

  • After changing your skin on Minecraft.net it can take up to 1 hour for the facial avatar or skin preview to show the new skin.
  • The skin preview differenciates between the Steve (4 pixel arm width) and Alex skin (3 pixel arm width) by checking the alpha value on the pixel at 54, 20. Therefore, the preview assumes that the skin is well formed and that the unallocated areas are transparent.
  • Default skins: Steve and Alex
  • Skin templates: Steve and Alex

License

Minecraft Avatar is licensed under the MIT license, see LICENSE.md for details.

Something went wrong with that request. Please try again.