Create a Drupal 8 version of this module

CommentFileSizeAuthor
#2 image_lazy_loader.tar_.gz2.31 KBpsebborn

Comments

psebborn created an issue. See original summary.

psebborn’s picture

Status: Active » Needs review
StatusFileSize
new2.31 KB

I've created a Drupal 8 version; this is a bit cut down as an initial pass though.
Instead of a new field formatter, I've just added a checkbox to the existing image / responsive image formatters to pick if the image should be lazyloaded or not.

If it is then the lozad library is loaded and the attributes updated.

I thought this could be a good start; happy to add the settings and animation features at a later date though.

I've attached a tarball with my version of the code - have a look through and please, give me some feedback!

urix’s picture

I can't find settings page for this module

/admin/config/media/image-lazy-loader - not found

psebborn’s picture

@urix is this for the D8 port? For the port I've not actually implemented the settings page as for my use case I just needed the lazyload on/off attributes without the need for the animations.

The README.txt in the tarball from #2 should hopefully explain this; shout if it's not though!

psebborn’s picture

Version: 7.x-1.x-dev » 8.x-1.0
Status: Needs review » Fixed
psebborn’s picture

Status: Fixed » Closed (fixed)