Newsletter
Join the Community
Subscribe to our newsletter for the latest news and updates
A Gatsby starter for sharing photosets with infinite scroll and postcard views.
Gatsby Starter Photo Book is a Gatsby-based boilerplate for sharing photosets as a fast, responsive website with an infinite-scroll CSS Grid gallery and a postcard-style photo viewer.
Gatsby Starter Photo Book is a static-site boilerplate created by Atte (GitHub user baobabKoodaa) and forked from his Gatsby Starter Infinite Scroll. It takes a folder of images and generates a website with two views: a thumbnail gallery laid out on CSS Grid, and a "postcard" view for each photo with a fullscreen toggle. The starter runs on Gatsby v4, requires Node v16 and gatsby-cli v4, and outputs pre-rendered pages that work without JavaScript. It was originally built to share the author's wedding photos, and the demo uses Unsplash images.
/images/58 serve pre-rendered pages, while JS users get an SPA-style navigation between them.gatsby-node.js; naming a photo cat_crophelper.jpg lets you pre-crop it by hand and the starter crops from that copy.The starter expects Node v16 and gatsby-cli v4 installed globally. After running npm install, you run gatsby develop to test locally; at build time Gatsby processes the images in the folder, generates thumbnails and multiple sized copies, and pre-renders each gallery and postcard page. The infinite scroll fetches metadata in batches of 20 and the first batch is embedded in the initial page load.
Yes, the core views work without JS. The infinite scroll degrades to pagination, and photos are accessible through pre-rendered pages at paths like /images/58. Some advanced behavior, such as the scroll-position memory when returning from postcard view, falls back to simpler behavior.
There are two documented issues: on Chrome for Android the address bar can appear or hide, causing an empty strip that the photo doesn't fill (a fullscreen toggle works around it), and a rare corner-case handler may attempt to fetch nonexistent pages, which is harmless and has its errors suppressed.
If many of your photos aren't the aspect ratio you set in gatsby-node.js, you can pre-crop them approximately and name the copy with _crophelper (for example, cat_crophelper.jpg). The starter crops from that copy to save manual exact-crop time.
You need Node v16 (nvm is recommended) and gatsby-cli v4 installed globally with npm install -g gatsby-cli@latest-v4. Then install dependencies with npm install and run gatsby develop.
