question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Ability to link directly to a generated SVG/PNG

See original GitHub issue

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)

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:2
  • Comments:10

github_iconTop GitHub Comments

6reactions
gkobergercommented, Jan 6, 2018

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">
4reactions
gkobergercommented, May 23, 2018

@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)

Read more comments on GitHub >

github_iconTop Results From Across the Web

The Best Way to Embed SVG on HTML (2021) - Vecta.io
SVG images embedded with <img> tags are very easily maintained. Because they are encapsulated, they can contain IDs and classes that are ...
Read more >
The Many Ways to Link Up Shapes and Images with HTML ...
The only trick here is to make sure the <a> tag is inside the SVG markup and that the tag wraps the shape...
Read more >
Adding vector graphics to the web - Learn web development
For creating SVG images, most people use a vector graphics editor like Inkscape or Illustrator. These packages allow you to create a variety...
Read more >
Convert SVG to PNG using your browser - myByways
My intention is to do the conversion purely within the browser - nothing is sent to any server, not the SVG nor the...
Read more >
Accessibility Features of SVG - W3C
Scalable Vector Graphics ( SVG ) offers a number of features to make graphics on the Web more accessible than is currently possible,...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found