crypti / cryptocurrencies

📋 Get a list of all the cryptocurrency symbols and names.
MIT License
260 stars 112 forks source link

Find ways to get the coin icons #1

Closed brh55 closed 6 years ago

brh55 commented 7 years ago

Per reddit users, it would be great if we could include the coin icon for each coin. What your thoughts on how we can handle this?

radiovisual commented 7 years ago

Well, that is possible. The cryptocompare API returns a url for coin icons for coins that have an icon (coins that don't have an icon are assigned a default image). So we could include a link to the icon in the cryptocurrencies.json dataset. The question is whether or not we should be (or even allowed to per the cryptocompare TOS) "hotlinking" the cryptocompare images, if not, then we would need to push/host the images somewhere else.

If the icons are really small, then another possibility is to embed a base64 encoding of the image within the dataset (obviously, this only works if the images are really small).

brh55 commented 7 years ago

Ah I see now. Hmm I don't see anything in their ToS against "hot linking" images, but I would imagine that's because no one has really done it at a large scale. The base64 encoding is concerning as it would increase the actual file size as well.

Could we possibly download the images and host the photos within a subfolder inside this repository ? Or a separate repo that host the coin icons, which can be a peer dependency of this module (so assets are imported separately when needed).

radiovisual commented 7 years ago

Yeah, the filesize of the module will be pretty large if we want to include (up to) thousands of images, so maybe we can run a few tests and see which way would be the most economical (all things considered).

ghost commented 6 years ago

I have written a script and uploaded the JSON object here https://gist.github.com/crazyzultan/b22dcd692acb14a2e2a46712a860ed46 with all of the crypto symbols and their corresponding names / images.

ghost commented 6 years ago

https://github.com/crazyzultan/cryptocurrency-images/tree/master I have listed here a link and basic documentation to retrieve the pictures.

radiovisual commented 6 years ago

@crazyzultan, nice work. 👍 I have done something similar in PR #6. Still not sure what to do with the images, but PR #6 is a start.

ghost commented 6 years ago

@radiovisual I have all the images hosted on a website so they are easily avaliable for situations like embeds.

radiovisual commented 6 years ago

@crazyzultan

I have all the images hosted on a website so they are easily available for situations like embeds.

What is your plan with the hosting of these images? Are you trying to say you want to somehow incorporate your images with this list? How are you grabbing these images? You only have 1400+ images, but there are over 1900+ currencies in this list (and my script grabs almost all 1900+ images directly from the cryptocompare hosting)...

ghost commented 6 years ago

@radiovisual I am just simply providing a service where the images for alt coins can be found and used quite easily for different situations. I am using a small script I made https://gist.github.com/crazyzultan/4c0b7710b722e790719dccca25e5d42d to grab the images. The amount of images is a bit lacking due to the script not being as optimized as it could be due to lack of effort on my part.