No description
| node_modules/.mf | ||
| src | ||
| .gitignore | ||
| LICENSE | ||
| package-lock.json | ||
| package.json | ||
| README.md | ||
| wrangler.toml | ||
FxFlickr
A simplified web app that fixes Flickr's unreliable embeds by providing reliable versions at fxflic.kr/p/... instead of flic.kr/p/...
Features:
- Dynamic HTML generation with Open Graph and Twitter Card meta tags
- oEmbed endpoint for Discord and other platforms
- Cloudflare KV caching for improved performance
- All Flickr URL formats supported
Endpoints
Core Routes
GET /- Landing page with service explanationGET /p/:path- Photo embed for short URLs (e.g.,/p/2nq8K3Q)GET /photos/:user/:id- Photo embed for full URLsGET /photos/:user/sets/:setId- Photo set embedsGET /s/:path- Album page for short album URLs (e.g.,/s/aHBqjCEbca)GET /photos/:user/albums/:albumId- Album page for full album URLs
API Endpoints
GET /oembed?url=...- oEmbed API for Discord/other platformsGET /health- Health check with system statusGET /version- Detailed version and configuration info
Supported Flickr URL Formats
https://flic.kr/p/XXXX(Flickr short photo URLs)https://fxflic.kr/p/XXXX(FxFlickr photo URLs)https://www.flickr.com/photos/username/123456789(full photo URLs)https://www.flickr.com/photos/username/sets/setId(photo sets)https://flic.kr/s/XXXX(Flickr short album URLs)https://fxflic.kr/s/XXXX(FxFlickr album URLs)https://www.flickr.com/photos/username/albums/albumId(full album URLs)
Example: GET /oembed?url=https://flic.kr/p/2nq8K3Q
Installation
Local Development
- Clone or download the project.
- Run
npm installto install dependencies. - Run
npm startto start the server on port 3000.
Cloudflare Worker Deployment
- Install Wrangler:
npm install -g wrangler - Create a KV namespace:
wrangler kv:namespace create FLICKR_CACHE - Update
wrangler.tomlwith the namespace IDs (already done) - Deploy:
wrangler deploy
Note: KV namespaces are already configured in wrangler.toml. For production deployment, ensure your Cloudflare account has the KV namespace created.
Usage
- Replace
flic.krwithfxflic.krin Flickr short links - Or use full Flickr URLs: replace
flickr.comwithfxflic.kr - Examples:
- Short:
https://fxflic.kr/p/2rByfLs - Full:
https://fxflic.kr/photos/195672879@N08/54817344237/
- Short:
The app uses Flickr's oEmbed API to fetch the image URL and display it reliably.