chore: set image loading to lazy (#2733)

set image loading to lazy to avoid concurrent problem
This commit is contained in:
Athurg Gooth 2024-01-11 10:27:18 +08:00 committed by GitHub
parent aaec46a39c
commit 79b68222ff
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -27,6 +27,7 @@ const ResourceIcon = (props: Props) => {
return (
<SquareDiv className={classNames(className, "flex items-center justify-center overflow-clip")}>
<img
loading="lazy"
className="min-w-full min-h-full object-cover border rounded dark:border-none"
src={resource.externalLink ? resourceUrl : resourceUrl + "?thumbnail=1"}
onClick={() => showPreviewImageDialog(resourceUrl)}