<rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title>Avatar - 标签 - 研发日志 · R&amp;D Log</title><link>https://rd163.visword.com/tags/avatar/</link><description>Avatar - 标签 - 研发日志 · R&amp;D Log</description><generator>Hugo -- gohugo.io</generator><language>zh-CN</language><managingEditor>whutluohui@gmail.com (小智晖)</managingEditor><webMaster>whutluohui@gmail.com (小智晖)</webMaster><copyright>本作品采用知识共享署名-非商业性使用 4.0 国际许可协议进行许可。</copyright><lastBuildDate>Sun, 12 Jan 2025 00:00:00 +0800</lastBuildDate><atom:link href="https://rd163.visword.com/tags/avatar/" rel="self" type="application/rss+xml"/><item><title>使用 LetterAvatar 实现纯前端生成字母头像</title><link>https://rd163.visword.com/posts/golang-letter-avatar/</link><pubDate>Sun, 12 Jan 2025 00:00:00 +0800</pubDate><author><name>小智晖</name></author><guid>https://rd163.visword.com/posts/golang-letter-avatar/</guid><description><![CDATA[<h1 id="使用-letteravatar-实现纯前端生成字母头像" class="headerLink">
    <a href="#%e4%bd%bf%e7%94%a8-letteravatar-%e5%ae%9e%e7%8e%b0%e7%ba%af%e5%89%8d%e7%ab%af%e7%94%9f%e6%88%90%e5%ad%97%e6%af%8d%e5%a4%b4%e5%83%8f" class="header-mark"></a>使用 LetterAvatar 实现纯前端生成字母头像</h1><p>如何自动给没头像的用户生成一个昵称首字符的彩色头像。参考这个 golang 库：</p>
<ul>
<li><a href="https://github.com/disintegration/letteravatar" target="_blank" rel="noopener noreferrer">letteravatar</a></li>
</ul>
<p>遗憾的是，这个库不支持中文，因此可以将中文字符先转化为拼音再调用这个库。</p>]]></description></item></channel></rss>