Closed aricooperdavis closed 2 years ago
Thanks for the kind words and for this pull request! Great catch!
However, one question before I merge:
As this is a new option with 1.7, this will probably not be backwards compatible with 1.6, right?
In that case, the grav dependency version in the blueprints.yaml
has to be changed accordingly.
Good point! I don't think the config lookup worked properly until 1.7.4 (see Grav issue #3912) so I've updated the blueprints.yaml
dependency to that release.
The
<img>
tag'sloading
attribute specifies when the client's browser should start load the images.Grav has a global site setting (as of yet undocumented, but noted in the changelog) that allows site admins to specify what the value of this attribute should be. Twig's
.loading
action reads this setting and adds the appropraite attribute to the<img>
tag. This commit just adds this.loading
twig action when the thumbnails are generated.I don't know much about how browsers interpret the
loading
attribute, but I assume that for very large galleries that extend significantly past the viewport this might improve performance.Thanks for the excellent plugin 👍