Prerequisites
- A Framalab account with at least one project that has approved photos
- A gallery token — see Authentication
1. Install
2. Initialize the client
Store both values as environment variables — never hardcode them in source..env.local
client.ts
3. Fetch photos
fetch-photos.ts
4. Render (vanilla JS)
index.html
You should see all approved photos from your project rendered in the page.
Next steps
Photo Versions
thumb vs medium vs full — when to use each
getMediaUrl
Custom resize, format, and quality transforms
Error Handling
Handle auth and server errors gracefully