Memos is an open-source, self-hosted note-taking app that brings your everyday thoughts together in a personal timeline. Your data stays yours, and you choose what to keep private or share.
Go dockerfossgomarkdownmemomicroblognote-takingnotesopen-sourceown-your-datareactself-hostedsqlitetimeline
fix: add thumbnail param only for internal link (#1701)
Zeng19981e4a867a9a5c
diff --git a/web/src/components/MemoResourceListView.tsx b/web/src/components/MemoResourceListView.tsxindex f2792ec45..06279d76c 100644--- a/web/src/components/MemoResourceListView.tsx+++ b/web/src/components/MemoResourceListView.tsx@@ -46,7 +46,12 @@ const MemoResourceListView: React.FC<Props> = (props: Props) => {if (resource.type.startsWith("image")) {return (<SquareDiv key={resource.id} className="memo-resource">- <img src={absolutifyLink(url) + "?thumbnail=1"} onClick={() => handleImageClick(url)} decoding="async" loading="lazy" />+ <img+ src={resource.externalLink ? url : url + "?thumbnail=1"}+ onClick={() => handleImageClick(url)}+ decoding="async"+ loading="lazy"+ /></SquareDiv>);} else if (resource.type.startsWith("video")) {diff --git a/web/src/components/ResourceCover.tsx b/web/src/components/ResourceCover.tsxindex d102d3fe6..d28944d4e 100644--- a/web/src/components/ResourceCover.tsx+++ b/web/src/components/ResourceCover.tsx@@ -44,7 +44,7 @@ const ResourceCover = ({ resource }: ResourceCoverProps) => {<SquareDiv className="h-20 w-20 flex items-center justify-center overflow-clip"><imgclassName="max-w-full max-h-full object-cover shadow"- src={resourceUrl + "?thumbnail=1"}+ src={resource.externalLink ? resourceUrl : resourceUrl + "?thumbnail=1"}onClick={() => showPreviewImageDialog(resourceUrl)}/></SquareDiv>