I'd like to add class="lazyload" into thumbs (and not images) generated by this PHP block that allows Supersized plugin (http://buildinternet.com/project/supersized/) to detect the images and thumbs automatically from folders, but I can't figure out how to do it:
<?php
$directory = "../../photo-locations/riviera/photo/";
$directory_thumbs = "../../photo-locations/riviera/thumb/";
$images = glob($directory . "*.jpg");
$images_thumb = glob($directory_thumbs . "*.jpg");
$images_final = array_combine($images,$images_thumb);
$number = count($images);
$start = 0;
foreach($images_final as $image => $key)
{ echo "{image : ' $image ', title : 'Riviera' , thumb : '$key' }";
if ($start < $number - 1)
echo ", ";
$start = $start + 1;
}
?>
Supersized plugin is a fullscreen image gallery that unfortunately do not provide lazy loading of thumbs. I'm also trying to find a good lazy-loading script that can handle images (thumbs in this case) just with a class and not in conjunction with a data-src or data-srcset attribute - which are not used by this plugin. Please, anyone have any idea? Thanks!