Add lazy loading of images. Fixes #329 (#379)

This commit is contained in:
Dessalines 2021-08-23 16:16:05 -04:00 committed by GitHub
parent 08aa1bb511
commit 6a3bdaa85c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View 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 "}
${