-
-
Notifications
You must be signed in to change notification settings - Fork 9
Open
Labels
featureNew feature or requestNew feature or requestnode dependenciesIssues related to Node Dependencies extensionIssues related to Node Dependencies extension
Description
Hi there 👋
I'm the creator of https://github-icons.com / https://github.com/samdenty/github-icons.
We provide a free-to-use API to retrieve icons for NPM packages. I think it'd be pretty cool if you integrated it with this project
The API is as simple as loading an image tag with
https://github-icons.com/npm/PACKAGE_NAME
for example https://github-icons.com/npm/react
This image can return a 404 if no icon is found. It can also take a while waiting for the GitHub API (second time is always instant), so on https://github-icons.com I do the following.
- Render the
<img>tag withopacity: 0, andobject-fit: contain(so it retains aspect ratio) - Render a loading animation in the place of the icon, with position absolute
- Attach an onLoad handler to the image, which removes the loading animation and unhides the icon
- Attach an onError handler to the image which updates the
srcto either a generic npm logo or not found icon
bop34
Metadata
Metadata
Assignees
Labels
featureNew feature or requestNew feature or requestnode dependenciesIssues related to Node Dependencies extensionIssues related to Node Dependencies extension
