mirror of
https://github.com/stashapp/stash.git
synced 2025-12-17 20:34:37 +03:00
Lazy load images (#4228)
* Add lazy loading for many images * Load sprites on first hover of scrubber
This commit is contained in:
@@ -71,7 +71,12 @@ export const ScenePreview: React.FC<IScenePreviewProps> = ({
|
||||
|
||||
return (
|
||||
<div className={cx("scene-card-preview", { portrait: isPortrait })}>
|
||||
<img className="scene-card-preview-image" src={image} alt="" />
|
||||
<img
|
||||
className="scene-card-preview-image"
|
||||
loading="lazy"
|
||||
src={image}
|
||||
alt=""
|
||||
/>
|
||||
<video
|
||||
disableRemotePlayback
|
||||
playsInline
|
||||
@@ -166,7 +171,12 @@ export const SceneCard: React.FC<ISceneCardProps> = (
|
||||
}
|
||||
|
||||
return (
|
||||
<img className="image-thumbnail" alt={studioName} src={studioImage} />
|
||||
<img
|
||||
className="image-thumbnail"
|
||||
loading="lazy"
|
||||
alt={studioName}
|
||||
src={studioImage}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user