Skip to content

Custom icons in badges #8872

Answered by chris48s
IndianBartonka asked this question in Ideas
Discussion options

You must be logged in to vote

You can pass a base64 encoded custom logo as a query parameter. There are docs on this at https://github.com/badges/shields/blob/master/doc/logos.md#custom-logos However, there is a bit of a constraint on this: There is a limit on the total size of request headers we can accept (8192 bytes). This means the base64-encoded image text is limited to somewhere slightly under 8192 bytes depending on the rest of the request header.

In practice, this usually means that your custom logo needs to be a SVG. We theoretically can accept a PNG in a base64 string but most real-world PNGs are too big and hit the size limit.

Replies: 3 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by calebcartwright
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Ideas
Labels
None yet
2 participants