identicon-api | A simple API to retrieve SVG identicons
kandi X-RAY | identicon-api Summary
kandi X-RAY | identicon-api Summary
This project stemmed from the need to include dynamic, default identicons for new users of UNUM. I was inspired by the amazing work of jdenticon, a javascript module that allowed the generating of identicons. This project provides a simple interface to that project.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Returns a list of directories in a path .
identicon-api Key Features
identicon-api Examples and Code Snippets
Community Discussions
Trending Discussions on identicon-api
QUESTION
I'm using https://identicon-api.herokuapp.com/ to embed identicons in my page. You can choose either SVG or PNG. PNG works just fine, but for performance reasons, I want to use SVG. But when I use SVGs, the image isn't found, and the alt-text is displayed.
Nevertheless, the URL is valid, and when I open the image in a new tab, it's rendered correctly.
...ANSWER
Answered 2021-Jan-26 at 19:56The SVG has an incorrect MIME type set by the server. requires the MIME type to be
image/svg+xml
, but https://identicon-api.herokuapp.com/ currently sets it to text/html
, which causes a loading error:
For reference, here's a sample SVG with the proper MIME type that renders correctly in an :
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install identicon-api
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page