<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
</head>
<body>

<?php
echo "<h1>Test WebP</h1>";
echo "<p>";
$d = dir(dirname(__FILE__) . '/');
while (false !== ($entry = $d->read())) {
    $re = '/^img.*\.webp/m';
    preg_match_all($re, $entry, $matches, PREG_SET_ORDER, 0);
    if ($matches) {
	echo "<img src=\"".$matches[0][0]."\" alt=\"obrazek ".$matches[0][0]."\" width=\"1296px\" height=\"972\" style=\"border-radius: 30px;\">";
    }
}
echo "</p>";
$d->close();
?>
</body>
</html>
