Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ability to link directly to a generated SVG/PNG #2

Closed
Shpigford opened this issue Dec 29, 2017 · 10 comments
Closed

Ability to link directly to a generated SVG/PNG #2

Shpigford opened this issue Dec 29, 2017 · 10 comments

Comments

@Shpigford
Copy link

The ability to download a generated SVG or PNG is great, but I'd love to be able to link directly to the SVG or PNG file.

Use case here is generating random avatars for user profiles on a web app.

Basically want to use this app as an API server for generating these and then link to randomly generated images.

example.com/?accessoriesType=Prescription01&avatarStyle=Transparent&clotheColor=Blue01&clotheType=BlazerShirt&eyeType=Hearts&eyebrowType=SadConcerned&facialHairColor=Black&facialHairType=BeardLight&graphicType=Resist&hairColor=Black&mouthType=Smile&skinColor=Light&topType=LongHairMiaWallace.svg

(Note the added .svg on the end of the URL)

@gkoberger
Copy link

For anyone else who wants this, you can use https://avataaars.io for it. Just use the query strings from getavataaars.com:

<img src="https://avataaars.io/?accessoriesType=Prescription01&avatarStyle=Circle&clotheType=Hoodie&eyeType=EyeRoll&eyebrowType=UnibrowNatural&facialHairType=BeardLight&hairColor=Black&mouthType=Eating&skinColor=Yellow&topType=LongHairShavedSides">

@wpitallo
Copy link

Any idea what the source code for https://avataaars.io/ is doing? Would be great if this was available as well

@birdycn
Copy link

birdycn commented Mar 5, 2018

thanks

@gkoberger
Copy link

@wpitallo here ya go: https://github.com/gkoberger/avataaars

Basically, just rendering react on the server

@nosovsh
Copy link

nosovsh commented May 7, 2018

@gkoberger thanks for the possibility to use it directly via link in img. How safe is it to use on my website (no highload in any way)? I mean do you plan to keep this server alive or is it better to save images after generation?

@gkoberger
Copy link

@nosovsh it seems pretty simple to run, so I expect it to be pretty safe to direct link to! I plan on just leaving it up forever (it runs on a $7 heroku instance, so I'm not worried)

@wpitallo
Copy link

Awesome thank you! @gkoberger

@levi0214
Copy link

levi0214 commented May 1, 2019

Awesome! @gkoberger

@clementdevos
Copy link

It's been down once, could you open source your code so we can host it for us?

Cheers,

@Shpigford
Copy link
Author

kochergin added a commit to kochergin/avataaars that referenced this issue Aug 26, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants