Sign inSign up

dreamplay/hello_avatar

By dreamplay

•Updated over 1 year ago

轻松搭建生成简易头像的api服务

Image
API management
0

1.2K

dreamplay/hello_avatar repository overview

⁠hello_avatar

go to github⁠

轻松搭建生成简易头像的api服务

⁠安装

docker-compose.yml

version: '3'
services:
  hello_avatar:
    image: dreamplay/hello_avatar
    ports:
      - 13130:13130

运行

docker-compose up -d

⁠使用

访问示例页面

访问接口:

接口将返回png图片内容,尺寸为500*500

参数控制:

字段是否必填类型简介
type否string生成头像类型,
ugly-avatar-丑头像(默认),参考:https://github.com/txstc55/ugly-avatar⁠
multiavatar-插画头像,参考:https://multiavatar.com/⁠
jdenticon-随机头像,参考:https://jdenticon.com/icon-designer.html⁠
dicebear-风格头像,参考:https://www.dicebear.com/styles/⁠
style否string风格类型,仅当type=dicebear时有效
male-男性风格
female-女性风格
avataaars-由Avataaars设计的头像
bottts-像素机器人
gridy-棋盘格式风格
human-贴近真实人类样貌
identicon-GitHub使用的Identicons风格的头像
initials-显示用户初始字母的简单风格
seed否string头像生成种子变量,仅当type=dicebear且style=initials时有效

⁠参考图片

type=ugly-avatar

type=multiavatar

type=jdenticon

type=dicebear

风格类型+种子变量malefemaleavataaarsbotttsgridyhumanidenticoninitials+测试
示例

Tag summary

Content type

Image

Digest

sha256:40ce09a80…

Size

163.5 MB

Last updated

over 1 year ago

docker pull dreamplay/hello_avatar