No description
Find a file
2025-12-20 11:42:30 +00:00
node_modules/.mf logo update 2025-12-18 23:54:29 +00:00
src remove build date (it's not really needed) 2025-12-20 11:42:30 +00:00
.gitignore no wrangler 2025-12-18 16:41:51 +00:00
LICENSE fxflickr but cloudflared 2025-12-18 16:41:23 +00:00
package-lock.json fxflickr but cloudflared 2025-12-18 16:41:23 +00:00
package.json fxflickr but cloudflared 2025-12-18 16:41:23 +00:00
README.md Add support for Flickr albums: short URLs (/s/:path) and full URLs (/photos/:user/albums/:albumId) 2025-12-18 17:53:19 +00:00
wrangler.toml Update wrangler config 2025-12-18 17:40:39 +00:00

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 explanation
  • GET /p/:path - Photo embed for short URLs (e.g., /p/2nq8K3Q)
  • GET /photos/:user/:id - Photo embed for full URLs
  • GET /photos/:user/sets/:setId - Photo set embeds
  • GET /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 platforms
  • GET /health - Health check with system status
  • GET /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

  1. Clone or download the project.
  2. Run npm install to install dependencies.
  3. Run npm start to start the server on port 3000.

Cloudflare Worker Deployment

  1. Install Wrangler: npm install -g wrangler
  2. Create a KV namespace: wrangler kv:namespace create FLICKR_CACHE
  3. Update wrangler.toml with the namespace IDs (already done)
  4. 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.kr with fxflic.kr in Flickr short links
  • Or use full Flickr URLs: replace flickr.com with fxflic.kr
  • Examples:
    • Short: https://fxflic.kr/p/2rByfLs
    • Full: https://fxflic.kr/photos/195672879@N08/54817344237/

The app uses Flickr's oEmbed API to fetch the image URL and display it reliably.