Unverified Commit 79b68222 authored by Athurg Gooth's avatar Athurg Gooth Committed by GitHub

chore: set image loading to lazy (#2733)

set image loading to lazy to avoid concurrent problem
parent aaec46a3
...@@ -27,6 +27,7 @@ const ResourceIcon = (props: Props) => { ...@@ -27,6 +27,7 @@ const ResourceIcon = (props: Props) => {
return ( return (
<SquareDiv className={classNames(className, "flex items-center justify-center overflow-clip")}> <SquareDiv className={classNames(className, "flex items-center justify-center overflow-clip")}>
<img <img
loading="lazy"
className="min-w-full min-h-full object-cover border rounded dark:border-none" className="min-w-full min-h-full object-cover border rounded dark:border-none"
src={resource.externalLink ? resourceUrl : resourceUrl + "?thumbnail=1"} src={resource.externalLink ? resourceUrl : resourceUrl + "?thumbnail=1"}
onClick={() => showPreviewImageDialog(resourceUrl)} onClick={() => showPreviewImageDialog(resourceUrl)}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment