mirror of
https://github.com/usatiuk/photos.git
synced 2025-10-28 15:27:49 +01:00
do not lazyload thumbnails
to avoid reflow
This commit is contained in:
@@ -37,7 +37,6 @@ export const PhotoComponent: React.FunctionComponent<IPhotoComponentProps> = (
|
|||||||
<div id="photoView">
|
<div id="photoView">
|
||||||
<img
|
<img
|
||||||
id="photoImg"
|
id="photoImg"
|
||||||
loading="lazy"
|
|
||||||
className={loaded ? "loaded" : "notLoaded"}
|
className={loaded ? "loaded" : "notLoaded"}
|
||||||
onLoad={() => setLoaded(true)}
|
onLoad={() => setLoaded(true)}
|
||||||
src={getPhotoThumbPath(props.photo, 2048)}
|
src={getPhotoThumbPath(props.photo, 2048)}
|
||||||
|
|||||||
@@ -76,7 +76,6 @@ export class PhotoCardComponent extends React.PureComponent<
|
|||||||
>
|
>
|
||||||
{fileExists ? (
|
{fileExists ? (
|
||||||
<img
|
<img
|
||||||
loading="lazy"
|
|
||||||
src={getPhotoThumbPath(this.props.photo, 512)}
|
src={getPhotoThumbPath(this.props.photo, 512)}
|
||||||
className={this.state.loaded ? "loaded" : "notLoaded"}
|
className={this.state.loaded ? "loaded" : "notLoaded"}
|
||||||
onLoad={() => this.setLoaded(true)}
|
onLoad={() => this.setLoaded(true)}
|
||||||
|
|||||||
Reference in New Issue
Block a user