Icon-Proxy provides a simple way to fetch a specified user’s icon from various platforms through Cloudflare Pages Functions.
-
GitHub
Request
https://example.org/icon/github/[username]
! -
Gavatar
Request
https://example.org/icon/gavatar/[email]
!NOTE
Please DO NOT hash your email, we'll do it for you.
If you still want to hash your email, please use
https://example.org/icon/hashed-gavatar/[hashed-email]
The Size query string is supported (1~2048 pixels), example below:
https://example.org/icon/gavatar/[email]?s=512
-
Telegram
Request
https://example.org/icon/telegram/[username]
!NOTE
We only support: username =
xxxxxxx
(@xxxxxxx
without@
).if the user mark their PFP not public, this service simply won't works.
-
QQ
Request
https://example.org/icon/qq/[qq num id]
!Warning
Only use it when necessary, considering speed.
Deploy this project like any normal pages project.
-
🍴 Fork this project,
-
🏃 Open your Cloudflare Dashboard and navigator to Workers & Pages,
-
🔥 Click Create application (and connect to GitHub if you haven't done it before), navigator to Pages, then select the repo you just forked,
-
🚀 Hit the Begin Setup, scroll as fast as you can and press the Save and Deploy Button,
(The Build command is
pnpm install
, the default may works, but specifying it is better.) -
✨ You're all set!
emn178/js-sha256 - used to hash email address in Gavatar