Photos
Share event photos with an authenticated gallery that attendees can browse and contribute to.
Quick outcome
The photo gallery lets attendees upload and browse event photos. All photos are stored in R2 (or local filesystem in dev) and served through an authenticated proxy. Organizers moderate the gallery from the admin dashboard.
Setup
Photos are available by default — no special configuration needed. The gallery requires attendees to sign in before viewing or uploading.
Storage is handled automatically:
- Production: Cloudflare R2 bucket
- Local dev:
apps/event-site/data/objects/filesystem directory
Day-to-day management
Moderating photos
Navigate to /admin/photos to manage the gallery:
- View all uploaded photos with metadata (filename, uploader, size, date)
- Filter or search by uploader email or upload time
- Delete inappropriate or duplicate photos
- Download or inspect original files
Photo metadata
Each photo record includes:
| Field | Description |
|---|---|
| Filename | Original file name |
| Caption | Optional description added by uploader |
| Uploaded by | Email of the person who uploaded |
| Size | File size in bytes |
| Content type | MIME type (image/jpeg, image/png, etc.) |
| Created at | Upload timestamp |
Deleting photos
When you delete a photo:
- The database record is removed
- The file is deleted from R2/filesystem storage
- The deletion is immediate and permanent
Attendee experience
Browsing the gallery
Attendees visit /photos (requires sign-in) to browse all event photos:
- Photos display in a responsive grid layout
- Each photo shows its caption (if provided)
- Click to view full-size image
Uploading photos
At /photos/upload, attendees can:
- Select image files to upload
- Add optional captions
- Submit to upload
Upload constraints:
- Image files only (JPEG, PNG, etc.)
- Maximum file size: 10 MB per image
- Files are served through the authenticated API proxy at
/api/photos/[...key]
Authentication
All photo routes require a valid session. Unauthenticated users are redirected to /auth with a return URL back to the gallery.
Troubleshooting
| Symptom | Fix |
|---|---|
| Upload fails | Check file size (max 10 MB) and file format (images only) |
| Photo missing after upload | Refresh the page; check R2 binding or filesystem permissions |
| Cannot access gallery | Sign in first; verify you're on the allowed emails list |
| Thumbnails not loading | Verify the authenticated image proxy endpoint is working |
| Delete fails | Check that the R2 key exists and the database transaction succeeds |
Next steps
- Documents — share files with permission controls
- People & Access — manage who can access the gallery
- Post-Event Mode — photos remain accessible after the event