Skip to content

armgit / memos

Public Imported from GitHub
0

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.

fix: image width error while loading (#2394)

Athurg Goothe30d0c2dd028
diff --git a/web/src/components/MemoResourceListView.tsx b/web/src/components/MemoResourceListView.tsx
index 517a860a7..3843a58b8 100644
--- a/web/src/components/MemoResourceListView.tsx
+++ b/web/src/components/MemoResourceListView.tsx
@@ -44,7 +44,7 @@ const MemoResourceListView: React.FC<Props> = (props: Props) => {
(imageResourceList.length === 1 ? (
<div className="mt-2 max-w-full max-h-72 flex justify-center items-center border dark:border-zinc-800 rounded overflow-hidden hide-scrollbar hover:shadow-md">
<img
- className="cursor-pointer min-h-full w-auto min-w-full object-cover"
+ className="cursor-pointer min-h-full w-auto object-cover"
src={getResourceUrl(imageResourceList[0])}
onClick={() => handleImageClick(getResourceUrl(imageResourceList[0]))}
decoding="async"
@@ -65,7 +65,7 @@ const MemoResourceListView: React.FC<Props> = (props: Props) => {
className="flex justify-center items-center border dark:border-zinc-900 rounded overflow-hidden hide-scrollbar hover:shadow-md"
>
<img
- className="cursor-pointer min-h-full w-auto min-w-full object-cover"
+ className="cursor-pointer min-h-full w-auto object-cover"
src={resource.externalLink ? url : url + "?thumbnail=1"}
onClick={() => handleImageClick(url)}
decoding="async"