<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Image Gallery</title>
    <style>
        .gallery {
            display: flex;
            flex-wrap: wrap;
        }
        .gallery img {
            margin: 10px;
            max-width: 200px;
            height: auto;
        }
        .gallery div {
            text-align: center;
            margin: 10px;
        }
    </style>
</head>
<body>
    <h1>Image Gallery</h1>
    <div class="gallery">
        {% for image in images %}
        <div>
            <h3>{{ image['username'] }}</h3>
            <img src="{{ image['media_url'] }}" alt="Image for {{ image['username'] }}">
        </div>
        {% endfor %}
    </div>
</body>
</html>
