Giter Site home page Giter Site logo

vercel / avatar Goto Github PK

View Code? Open in Web Editor NEW
1.1K 9.0 66.0 179 KB

๐Ÿ’Ž Beautiful avatars as a microservice

Home Page: https://avatar.vercel.sh

License: MIT License

JavaScript 4.20% TypeScript 59.70% CSS 36.10%
svg-avatar avatar random-avatars avatar-placeholder beautiful-avatars vercel

avatar's Introduction

avatar

Generate beautiful gradient avatars for your application.

Usage

Provide a username to generate an avatar. Each name will generate a unique avatar. Just replace rauchg with an username or email:

https://avatar.vercel.sh/rauchg

You will receive a png image with a size of 120*120px

Avatar for rauchg

Custom Size

https://avatar.vercel.sh/rauchg?size=30

Avatar for rauchg

SVG

Add the extension .svg:

https://avatar.vercel.sh/rauchg.svg

Add Initials

Add the text parameter (requires SVG):

https://avatar.vercel.sh/rauchg.svg?text=GR

Avatar for rauchg

avatar's People

Contributors

bfred-it avatar dependabot[bot] avatar leerob avatar michieldemey avatar pontusab avatar saravanak avatar snyk-bot avatar timolins avatar tobiaslins avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

avatar's Issues

File extension influences avatar

This bug doesn't occur with GET parameters, only with custom extensions.

https://avatar.tobi.sh/timo.jpg

https://avatar.tobi.sh/timo.png

size=20000 gives an error

maybe it makes sense to add an upper limit and cut at that
so
if(size>upperLimit) size=upperLimit;

CUID as seed creates mostly one gradient.

I am using CUIDs for my app, and wanted to use vercel/avatar to generate avatars for my users based on those CUIDs, to avoid storing images. I implemented this but then noticed that it seemed to often give one specific gradient (red/green), rather then a variety of different ones. Unfortunately, the gradient that it gives is pretty ugly.

The CUIDs to generate this image can be found here: https://gist.github.com/cursecodes/4b48449a5b7a526615f51e57e6cd6013

image

I am assuming this has something to do with djb2, but I have no clue.

Size can only be a square

size=300 returns a 300x300 image while size=300x300 returns a 120x120px image.
It would be nice to set width as well as the height.

Broken in gmail

Gmail does not seem to support these avatars / svg images. Are there any solutions or workarounds for this?

Use without api in nodejs.

I'd like to use this in node so If possible can you please export the functions :
generateSVG
generatePNG
and publish the package to npm? it'd be super helpful. :)

Unable to deploy to Heroku

Apparently you need to specify a Node version in the package.json to enable heroku deploys:

-----> Build failed
       
       We're sorry this build is failing! You can troubleshoot common issues here:
       https://devcenter.heroku.com/articles/troubleshooting-node-deploys
       
       Some possible problems:
       
       - Node version not specified in package.json
         https://devcenter.heroku.com/articles/nodejs-support#specifying-a-node-js-version
       
       Love,
       Heroku

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.