Repository navigation
Custom icons in badges #8872
Replies: 3 comments
|
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. |
0 replies
Answer selected by
calebcartwright
|
Thx |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment

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.