Add lazy loading of images. Fixes #329

This commit is contained in:
Dessalines 2021-08-21 16:47:03 -04:00
parent 08aa1bb511
commit 140564afb4

View file

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