images
folder contains about 14000 jpg
images.
I want to load them using loading = 'lazy'
but there is a performance problem on a client side (Chrome).
Each scroll firstly shows empty rectangles and then the images are loading, but very slowly.
On youtube
home page I'm scrolling fluently, i.e. without waiting for images, and as I can see - there is no limit to scroll down.
How to solve this?
$arr = glob("../images/*.jpg");
$ht = '';
foreach($arr as $el){
$ht .= "<img class='bimg' src = '" . $el . "' width = 151.11' height = '86.73' alt = 'img' loading = 'lazy'>\n";
}
echo $ht;