English | 简体中文
A fork of Afilmory optimized for S3-compatible storage and static deployment on Vercel
Quick Start • Features • Deployment • Live Demo
This repository is a customized fork of Afilmory, focused on S3-compatible storage and static deployment on Vercel.
- ✅ S3-only storage – Local filesystem and GitHub storage backends are removed to keep the deployment bundle as small as possible
- ✅ Vercel-optimized – Build process is tuned specifically for Vercel (including the free tier limits)
- ✅ Simplified configuration – Leaner build scripts and configuration, easier to get started
- ✅ One-click deployment – Ready-to-use Vercel deploy button
Huge thanks to Innei and the Afilmory team for creating this excellent photo gallery generator!
💡 If you need all features and the latest updates, please use the original Afilmory.
- 🖼️ High-performance WebGL renderer – Custom WebGL viewer with smooth zooming and panning
- 📱 Responsive masonry layout – Built on Masonic, adapts to all screen sizes
- 🎨 Modern UI design – Glassmorphic design system with Tailwind CSS 4
- ⚡ Incremental builds – Smart change detection, only processes new or modified photos
- 🌐 Internationalization – Built-in multi-language support
- 🔗 OpenGraph support – Beautiful social share previews
- 🔄 HEIC/HEIF support – Automatically convert Apple device photos
- 📷 TIFF support – Automatically convert professional photo formats
- 🖼️ Smart thumbnail generation – Multiple thumbnail sizes for optimized loading
- 📊 EXIF display – Full capture metadata: camera, focal length, aperture and more
- 🌈 Blurhash placeholders – Pleasant progressive image loading
- 📱 Live Photo support – Detect and display iPhone Live Photos
- ☀️ HDR support – Display HDR images
- 🎛️ Fujifilm film simulation – Read and display Fuji film simulation metadata
- 🔍 Fullscreen viewer – Gesture-friendly image viewer
- 🏷️ Filesystem-based tags – Auto-generate tags from folder structure
- ⚡ Concurrent processing – Multi-process / multi-threaded build pipeline
- 📷 Photo sharing – Share to social media or embed elsewhere
- 🗺️ Interactive map – MapLibre-based map for photos with GPS coordinates
- ☁️ S3-compatible storage only – Works with AWS S3, MinIO, Aliyun OSS, Tencent COS and other S3-compatible services
- 🌍 CDN-friendly – Supports custom CDN domains
- 📦 Zero photo bundling – Photos are never bundled into the static build
- 🚀 Fast deployment – Small build output, ideal for static hosting
- Official Demo – Official Afilmory demo
- Xudong's Lens
- Gallery by mxte
- Photography by pseudoyu
- Afilmory by magren
Click the button below and follow the prompts to configure S3-related environment variables:
Deployment steps:
- Click the "Deploy with Vercel" button above
- Sign in to your Vercel account
- Fork this repo to your GitHub account
- Configure required environment variables (see Environment Variables)
- Click Deploy
- Wait for the build to finish (first build usually takes 5–10 minutes)
💡 Recommended: For easier customization and deployment, it is strongly recommended to configure all site-specific settings via environment variables.
Environment variables > site.config.ts defaults
This means:
- ✅ If an environment variable is set, it takes precedence
- ✅ If not set, the fallback is the default in
site.config.ts
This project only supports S3-compatible storage. The following variables are required:
| Variable | Description | Example |
|---|---|---|
S3_BUCKET_NAME |
S3 bucket name | my-photos |
S3_REGION |
S3 region | us-east-1 |
S3_ACCESS_KEY_ID |
S3 access key ID | AKIAIOSFODNN7EXAMPLE |
S3_SECRET_ACCESS_KEY |
S3 access key secret | wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY |
| Variable | Description | Default | Example |
|---|---|---|---|
S3_ENDPOINT |
S3 endpoint | https://s3.us-east-1.amazonaws.com |
https://oss-cn-hangzhou.aliyuncs.com |
S3_PREFIX |
Path prefix for photos | empty | photos/ |
S3_CUSTOM_DOMAIN |
Custom CDN domain | empty | https://cdn.example.com |
S3_EXCLUDE_REGEX |
Regex for excluding files | empty | .*\.txt$ |
Strongly recommended to configure these via environment variables so you can update them from the Vercel dashboard without redeploying code:
| Variable | Description | Example |
|---|---|---|
SITE_NAME |
Site name | My Photo Gallery |
SITE_TITLE |
Site title | My Photo Gallery |
SITE_DESCRIPTION |
Site description | Capturing beautiful moments in life |
SITE_URL |
Site URL | https://your-site.vercel.app |
SITE_ACCENT_COLOR |
Accent color (hex) | #007bff |
| Variable | Description | Example |
|---|---|---|
AUTHOR_NAME |
Author name | Your Name |
AUTHOR_URL |
Author website | https://your-website.com |
AUTHOR_AVATAR |
Author avatar URL | https://avatar-url.com/avatar.png |
| Variable | Description | Example |
|---|---|---|
SOCIAL_GITHUB |
GitHub username | your-github-username |
SOCIAL_TWITTER |
Twitter/X handle | your-twitter-username |
SOCIAL_RSS |
Enable RSS | true or false |
| Variable | Description | Example |
|---|---|---|
FEED_FOLO_FEED_ID |
Folo Feed ID | your-feed-id |
FEED_FOLO_USER_ID |
Folo User ID | your-user-id |
| Variable | Description | Default | Possible values |
|---|---|---|---|
MAP_STYLE |
Map style | builtin |
builtin or custom URL |
MAP_PROJECTION |
Map projection | mercator |
globe or mercator |
- Go to your project dashboard
- Open Settings → Environment Variables
- Add the variables listed above
- Saving will trigger a new deployment
Create a .env file:
cp .env.template .envEdit .env and fill in your values:
# S3 storage (required)
S3_BUCKET_NAME=my-photos
S3_REGION=us-east-1
S3_ACCESS_KEY_ID=your-access-key-id
S3_SECRET_ACCESS_KEY=your-secret-access-key
# Site info (recommended)
SITE_NAME=My Photo Gallery
SITE_TITLE=My Photo Gallery
SITE_DESCRIPTION=Capturing beautiful moments in life
SITE_URL=https://your-site.vercel.app
# Author info (recommended)
AUTHOR_NAME=Your Name
AUTHOR_URL=https://your-website.com
AUTHOR_AVATAR=https://avatar-url.com/avatar.png
# Social (optional)
SOCIAL_GITHUB=your-github-username
SOCIAL_RSS=true- Node.js 18+
- pnpm 10+
- S3-compatible object storage (required)
# Clone the repo
git clone https://github.com/vsxd/afilmory-vercel.git
cd afilmory-vercel
# Install dependencies
pnpm installUpload your photos to an S3-compatible object storage. Supported formats:
- JPG / JPEG
- PNG
- HEIC (Apple devices)
- TIFF
- Live Photos (iPhone)
Important: This project only supports S3-compatible storage; photos are not bundled into the build output.
# Full build (generate manifest/thumbnails + build frontend)
pnpm build
# Only generate manifest and thumbnails
pnpm build:manifest
# Only build the frontend app from an existing manifest
pnpm build:web
# Local preview
pnpm previewOpen http://localhost:4173 to see your gallery.
Click the "Deploy with Vercel" button at the top of this README.
- Push this project to your own GitHub repo
- Go to vercel.com and import the repo
- Configure environment variables (see Environment Variables)
- Click Deploy
- Every push to
mainwill trigger an automatic redeploy
# Install Vercel CLI
npm i -g vercel
# Make sure your local .env is configured
# Deploy to production
vercel --prodThe project builds to static assets under apps/web/dist. You can deploy that folder to:
- Cloudflare Pages
- Netlify
- GitHub Pages
- Any static hosting provider
Build command: pnpm build
Output directory: apps/web/dist
# Development (does NOT process photos, uses existing manifest)
pnpm dev
# Full build (process photos + build frontend)
pnpm build
# Only process photos / generate manifest
pnpm build:manifest
# Only build the frontend app
pnpm build:web
# Preview build output
pnpm preview# Force re-process all photos
pnpm build:manifest -- --force
# Only regenerate thumbnails
pnpm build:manifest -- --force-thumbnails
# Only regenerate manifest
pnpm build:manifest -- --force-manifest- Upload new photos to your S3 bucket
- Push code to GitHub (to trigger Vercel) or run
vercel --prod - Vercel will automatically rebuild and redeploy
Incremental builds will automatically detect new/changed photos and only process the changed ones.
- React 19 – with React Compiler
- TypeScript – type-safe codebase
- Vite 7 – build tool
- Tailwind CSS 4 – styling
- Radix UI – accessible UI primitives
- Jotai – state management
- TanStack Query – data fetching
- React Router 7 – routing
- i18next – i18n
- Node.js – runtime
- Sharp – image processing
- AWS SDK – S3 operations
- Worker Threads – concurrency
- EXIF-Reader – EXIF extraction
Supported S3-compatible services:
- AWS S3 – Amazon S3
- MinIO – open-source object storage
- Aliyun OSS – Alibaba Cloud Object Storage
- Tencent COS – Tencent Cloud Object Storage
- Other S3-compatible providers
afilmory/
├── apps/
│ └── web/ # 🎨 Frontend SPA
├── packages/
│ ├── builder/ # 🔨 Photo processing tools
│ ├── webgl-viewer/ # 🖼️ WebGL viewer
│ ├── data/ # 📊 Shared types and manifest parsing
│ └── ui/ # 🎨 Shared UI primitives and hooks
├── generated/ # 📄 Generated manifest output
├── site.config.ts # ⚙️ Site defaults
├── site.config.build.ts # ⚙️ Build-time config injection
├── builder.config.ts # ⚙️ Builder configuration
└── vercel.json # 📦 Vercel deployment config
Edit site.config.ts:
export const siteConfig: SiteConfig = {
// ...
accentColor: '#ff6b6b',
}{
"map": ["maplibre"],
"mapStyle": "https://your-map-style.json",
"mapProjection": "globe"
}Language files are located under apps/web/public/locales/.
To add a new language:
- Create a new language directory (e.g.
fr/) - Copy and translate
common.json - Register the language code in
apps/web/src/lib/i18n.ts
Contributions, issues and feature requests are welcome!
- Fork the project
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is based on Afilmory and follows the same licenses:
Attribution Network License (ANL) v1.0
- Library code: MIT
- Project code: AGPL-3.0-or-later with UI attribution requirement
See LICENSE for details.
- Original Afilmory: github.com/Afilmory/Afilmory
- Official demo: afilmory.innei.in
- Static deployment guide: DEPLOY_STATIC.md
- Issue tracker: GitHub Issues
- Original author blog: innei.in
- Thanks to Innei and the Afilmory team for the original project
- Thanks to all photographers using this project
- Thanks to all open-source contributors
If this project helps you, please consider giving it a ⭐️ on GitHub!


