Skip to content

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:

FieldDescription
FilenameOriginal file name
CaptionOptional description added by uploader
Uploaded byEmail of the person who uploaded
SizeFile size in bytes
Content typeMIME type (image/jpeg, image/png, etc.)
Created atUpload timestamp

Deleting photos ​

When you delete a photo:

  1. The database record is removed
  2. The file is deleted from R2/filesystem storage
  3. The deletion is immediate and permanent

Attendee experience ​

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 ​

SymptomFix
Upload failsCheck file size (max 10 MB) and file format (images only)
Photo missing after uploadRefresh the page; check R2 binding or filesystem permissions
Cannot access gallerySign in first; verify you're on the allowed emails list
Thumbnails not loadingVerify the authenticated image proxy endpoint is working
Delete failsCheck that the R2 key exists and the database transaction succeeds

Next steps ​

Released under the MIT License.