0 or strpos($name, ".gif") > 0 or strpos($name, ".jxl") > 0);
}
function imagetime($file) { // This needs to return a Unix timestamp.
global $imagetimes;
if(!$imagetimes[$file]) {
$imagetimes[$file] = filemtime("../../art/".$file);
}
return $imagetimes[$file];
}
$images = array_filter(scandir("../../art"), "test_image"); // Generate array of every image in the directory by filename
usort($images, function($a, $b) { // Sort images by modification date of the files
return imagetime("$b") - imagetime("$a");
});
$pmt = "";
foreach($images as $im) { // Loops through each image and echoes it to the page
$no = substr($im, 0, strpos($im, ".")); // Filename with extension stripped
$mt = date("Y-m-d", imagetime("$im")); // File modification date in ISO format
$is = getimagesize("../../art/$im");
$ist = $is[0] . "×" . $is[1]; // Image size formatted as X×Ypx
if($pmt != $mt) {
$pmt = $mt;
if($pmt != "") {
echo "";
}
echo "