]> Untitled Git - lemmy-ui.git/commitdiff
Add lazy loading of images. Fixes #329 (#379)
authorDessalines <dessalines@users.noreply.github.com>
Mon, 23 Aug 2021 20:16:05 +0000 (16:16 -0400)
committerGitHub <noreply@github.com>
Mon, 23 Aug 2021 20:16:05 +0000 (16:16 -0400)
src/shared/components/common/pictrs-image.tsx

index 8526284b331ae52505801b03f6f44c05c3ea9aa1..5c8abb98bbdd128d55073a33a9a0a00807905b04 100644 (file)
@@ -27,6 +27,7 @@ export class PictrsImage extends Component<PictrsImageProps, any> {
         <img
           src={this.src("jpg")}
           alt={this.alt()}
+          loading="lazy"
           className={`
         ${!this.props.icon && !this.props.iconOverlay && "img-fluid "}
         ${