From e2cb527fcfd48790ddd7a7b0feefaed1a0f4bc25 Mon Sep 17 00:00:00 2001 From: Shusui MOYATANI Date: Tue, 7 Mar 2023 21:01:47 +0900 Subject: [PATCH] feat: support gyazo thumbnail --- src/components/textNote/ImageDisplay.tsx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/components/textNote/ImageDisplay.tsx b/src/components/textNote/ImageDisplay.tsx index d8d6264..e52ebeb 100644 --- a/src/components/textNote/ImageDisplay.tsx +++ b/src/components/textNote/ImageDisplay.tsx @@ -12,6 +12,9 @@ const fixUrl = (url: URL): string => { const imageId = match[1]; result.pathname = `${imageId}l.webp`; } + } else if (url.host === 'i.gyazo.com') { + result.host = 'thumb.gyazo.com'; + result.pathname = `/thumb/640_w${url.pathname}`; } return result.toString(); };