1
0
Fork 0
mirror of https://github.com/muerwre/vault-frontend.git synced 2025-04-24 20:36:40 +07:00

fixed image load on PhotoSwipe

This commit is contained in:
Fedor Katurov 2023-10-31 11:20:32 +06:00
parent 60acf8f14d
commit acacc42ccf
3 changed files with 7 additions and 15 deletions

View file

@ -23,7 +23,7 @@ const NodeImageLazy: FC<NodeImageLazyProps> = ({
if (file.url.endsWith('svg')) {
return (
<img
data-src={getURL(file, imagePresets[1600])}
data-src={getURL(file)}
className={className}
onClick={onClick}
onLoad={onLoad}
@ -36,6 +36,7 @@ const NodeImageLazy: FC<NodeImageLazyProps> = ({
return (
<img
data-srcset={getFileSrcSet(file)}
data-src={getURL(file, imagePresets[1600])}
width={file.metadata?.width}
height={file.metadata?.height}
onLoad={onLoad}