Badgen.net: Custom badge icons

Created on 27 Nov 2019  路  2Comments  路  Source: badgen/badgen.net

Is there a way that I'm missing to support custom icons for badges? As far as I could tell, external badges are only supported through SimpleIcons, which isn't a solution for services with icons that aren't (and can't be) on there.

Shields.io supports custom icons through Base64 data, which is what I was using previously (and have been considering Badgen as an alternative). Is there support for this on the way at some point? Or am I missing the correct way of handling this? (Tried passing in png and svg files to the icon arg, as well as base64 just in case).

Thanks.

Most helpful comment

You can pass url to a SVG (only) in the icon param.

https://badgen.net/badge/PayPal/Donate/003087?icon=https://simpleicons.now.sh/paypal/fff

In this example we are using Simpleicons, but you can pass any url that resolves to a svg.

https://badgen.net/badge/email/foobar/green?icon=https://image.flaticon.com/icons/svg/2258/2258842.svg

All 2 comments

You can pass url to a SVG (only) in the icon param.

https://badgen.net/badge/PayPal/Donate/003087?icon=https://simpleicons.now.sh/paypal/fff

In this example we are using Simpleicons, but you can pass any url that resolves to a svg.

https://badgen.net/badge/email/foobar/green?icon=https://image.flaticon.com/icons/svg/2258/2258842.svg

Ah I see, thanks for the info. It turns out the issue I was getting where the SVG icon wasn't displaying despite being passed in the same way was an issue of hosting. I was storing the svg files in the repo and linking to them that way - looks like I needed to take the rawgit/pages approach for it to work!

Thanks for the swift response and solution.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

shellscape picture shellscape  路  4Comments

tunnckoCore picture tunnckoCore  路  3Comments

amio picture amio  路  3Comments

styfle picture styfle  路  3Comments

GMartigny picture GMartigny  路  6Comments