Newsletter
Join the Community
Subscribe to our newsletter for the latest news and updates
A minimal, single-page photo gallery for Astro with a CSS-only justified grid and Fancybox lightbox.

Free Bootstrap 5 multi-page template for photo studio websites, with gallery, contact form, Google Maps, and video player.
Astro Photo Grid is a minimal, single-page photo gallery starter template for Astro that builds a responsive, justified image grid with a lightbox and zero JavaScript for layout.
Astro Photo Grid is a starter template for Astro that turns a folder of images into a single-page photo gallery. You provide your own photos in src/images and configure your site URL and site name, and the template outputs a static gallery page with a justified grid and a full-screen lightbox. It is distributed through GitHub's "Use this template" button, so you can clone it and deploy it to any static host such as Netlify (the linked demo runs on Netlify).
src/images, deploy to Netlify or another static host, and you have a live gallery.BaseLayout.astro.astro.config.mjs, update site from https://mysite.com to your actual site URL.src/layouts/BaseLayout.astro, update siteName to your site name.src/images with your own photos.Click the "Use this template" button on the GitHub repository to create your own copy, then update the site value in astro.config.mjs and the siteName in BaseLayout.astro before adding your photos.
No. The justified grid layout is pure CSS, and the only JavaScript that ships is for the Fancybox lightbox interactions. Image reflow on resize is handled natively by CSS.
Replace the image files in the src/images directory. The grid uses Astro's Image component, so the filenames you reference need to match what the component imports.
Fancybox. It provides the full-screen preview with swipe, drag, and pinch-to-zoom gestures, plus a toolbar you can customize.
All demo images are from Unsplash, so you can swap them out freely for your own photography.
