From 3fd511f4d9846f69e333c75ea9652015df60974b Mon Sep 17 00:00:00 2001 From: Kiko Beats Date: Tue, 14 Jan 2020 13:36:40 +0100 Subject: [PATCH 1/4] Use unavatar instead of Clearbit API Closes #376 unavatar.now.sh uses clearbit API logo (and more providers) under the hood. Also, the fallback image is customizable, e.g., https://unavatar.now.sh/daftpunk?fallback=https://i.imgur.com/0d1TFfQ.jpg --- src/components/Person.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/Person.js b/src/components/Person.js index 90b4dc4e..c4c8e7ae 100644 --- a/src/components/Person.js +++ b/src/components/Person.js @@ -7,7 +7,7 @@ import * as icons from '../util/icons'; export default function Person({ person, currentTag }) { const url = new URL(person.url); - const img = `https://logo.clearbit.com/${url.host}`; + const img = `https://unavatar.now.sh/${url.host}`; return ( From a30c0effbef1c2ae39884eec2abb457790a3bb6f Mon Sep 17 00:00:00 2001 From: Kiko Beats Date: Tue, 14 Jan 2020 14:56:17 +0100 Subject: [PATCH 2/4] build: add avatar width --- src/components/Person.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/Person.js b/src/components/Person.js index c4c8e7ae..15fac78c 100644 --- a/src/components/Person.js +++ b/src/components/Person.js @@ -7,7 +7,7 @@ import * as icons from '../util/icons'; export default function Person({ person, currentTag }) { const url = new URL(person.url); - const img = `https://unavatar.now.sh/${url.host}`; + const img = `https://images.weserv.nl/?url=https://unavatar.now.sh/${url.host}&w=50` return ( From 0238fccb63e1e1f556dc645836cf87d2cb2becff Mon Sep 17 00:00:00 2001 From: Kiko Beats Date: Tue, 14 Jan 2020 15:03:57 +0100 Subject: [PATCH 3/4] Add some CDN image optimizations --- src/components/Person.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/Person.js b/src/components/Person.js index 15fac78c..07b95961 100644 --- a/src/components/Person.js +++ b/src/components/Person.js @@ -7,7 +7,7 @@ import * as icons from '../util/icons'; export default function Person({ person, currentTag }) { const url = new URL(person.url); - const img = `https://images.weserv.nl/?url=https://unavatar.now.sh/${url.host}&w=50` + const img = `https://images.weserv.nl/?url=https://unavatar.now.sh/${url.host}&w=50&l=9&af&il&n=-1` return ( From 5dad7c1049a71cdee834848fe136fc09c5f82b29 Mon Sep 17 00:00:00 2001 From: Kiko Beats Date: Tue, 14 Jan 2020 15:15:28 +0100 Subject: [PATCH 4/4] build: use x2 width --- src/components/Person.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/Person.js b/src/components/Person.js index 07b95961..83a1859c 100644 --- a/src/components/Person.js +++ b/src/components/Person.js @@ -7,7 +7,7 @@ import * as icons from '../util/icons'; export default function Person({ person, currentTag }) { const url = new URL(person.url); - const img = `https://images.weserv.nl/?url=https://unavatar.now.sh/${url.host}&w=50&l=9&af&il&n=-1` + const img = `https://images.weserv.nl/?url=https://unavatar.now.sh/${url.host}&w=100&l=9&af&il&n=-1` return (