<?php
$dir = '.'; // folder containing your photos

// Get all files in the directory
$files = scandir($dir);

foreach ($files as $file) {
    // Skip current/parent directory references
    if ($file === '.' || $file === '..') continue;

    // Only allow image extensions
    $ext = strtolower(pathinfo($file, PATHINFO_EXTENSION));
    if (in_array($ext, ['jpg', 'jpeg', 'png', 'gif', 'webp'])) {
        echo "<img src='{$dir}{$file}' alt='' style='max-width:200px; margin:10px;'>";
    }
}
?>
