ZenphotoCMS 1.6.1

lazyload
in package

Filter HTML to add JS lazyloading using the script lazysizes

Tags
author

Malte Müller (acrylian)

Table of Contents

$lazyloadclass  : string
The class used for the lazyloading JS fallback
addNoscriptImgHTML()  : string
Creates a noscript fallback image
filterHTMLAttributes()  : array<string|int, mixed>
Filters image attributes
getJS()  : mixed
Gets the JS to include and also if enabled the default config

Properties

$lazyloadclass

The class used for the lazyloading JS fallback

public static string $lazyloadclass = 'lazyload'

Methods

addNoscriptImgHTML()

Creates a noscript fallback image

public static addNoscriptImgHTML(string $html) : string
Parameters
$html : string
Return values
string

filterHTMLAttributes()

Filters image attributes

public static filterHTMLAttributes(array<string|int, mixed> $attr) : array<string|int, mixed>
Parameters
$attr : array<string|int, mixed>

Array with key value pairs of attributes

Return values
array<string|int, mixed>

getJS()

Gets the JS to include and also if enabled the default config

public static getJS() : mixed
Return values
mixed

Search results