Lightning-fast, self-hostable image hosting using GitHub repositories and jsDelivr CDN. Get permanent URLs that work forever, even if your repo gets deleted.
- β‘ Lightning Fast: Global jsDelivr CDN with 99.9% uptime and edge caching
- π Permanent URLs: Commit-based URLs work even if repository/files are deleted
- π° Completely Free: No limits, no subscriptions - just upload and share
- π‘οΈ Self-Hostable: Deploy on your own infrastructure for full control
- π Global CDN: Images load instantly from 100+ edge locations worldwide
- π¦ Git-Backed: All images stored in Git with full version control
- π¨ Modern UI: Beautiful glassmorphism interface built with Next.js 15 & Tailwind CSS
- π± Responsive: Works perfectly on desktop, tablet, and mobile devices
- π Upload History: Track all your uploads with smart URL management
- π·οΈ Smart Badges: Visual indicators for CDN status and URL permanence
- Drag & drop interface with instant preview
- Support for JPG, PNG, GIF, WebP (up to 100MB)
- Automatic optimization and multiple URL formats
- Primary Feature: Commit-based CDN URLs for maximum performance
- Global edge network with heavy caching
- Permanent links that survive repository changes
- 99.9% uptime guarantee
-
jsDelivr CDN (Permanent) β Recommended
https://cdn.jsdelivr.net/gh/user/repo@commit/image.png- β Lightning fast global CDN
- β Heavy caching and edge optimization
- β Permanent URLs (work even if repo deleted)
-
Raw GitHub (Permanent)
https://raw.githubusercontent.com/user/repo/commit/image.png- β Direct GitHub access
- β Permanent commit-based URLs
-
jsDelivr CDN (Dynamic)
https://cdn.jsdelivr.net/gh/user/repo@branch/image.png- β CDN performance
- π Updates with repository changes
- RESTful API for external integrations
- Support for user-provided GitHub credentials
- Comprehensive documentation with examples
- Edge runtime for global performance
- Visual upload history with thumbnails
- One-click URL copying
- Repository source links
- File metadata tracking
- Clone and Install
npm installThen, run the development server:
npm run dev
# or
yarn dev
# or
pnpm dev
# or
bun devOpen http://localhost:3000 with your browser to see the result.
Create a .env.local file with your GitHub configuration:
GITHUB_TOKEN=your_github_token
GITHUB_OWNER=your_github_username
GITHUB_REPO=your_repository_name
GITHUB_BRANCH=main- Go to GitHub Settings > Developer settings > Personal access tokens
- Create a new Fine-grained personal access token or Classic token
- For fine-grained tokens, select your repository and grant these permissions:
- Contents: Write (to upload files)
- Metadata: Read (to access repository info)
- For classic tokens, select these scopes:
repo(Full control of private repositories)
- Copy the token to your
.env.localfile
No setup required! Use our hosted version directly:
curl -X POST \
-F "file=@/path/to/your/image.png" \
-F "github_token=ghp_your_token_here" \
-F "github_owner=your_username" \
-F "github_repo=your_repo" \
https://picser.pages.dev/api/public-uploadπ Privacy & Security:
- Your credentials are used only for the upload request
- Nothing is stored on our servers
- Direct communication with GitHub API
- Completely stateless and secure
π Web Interface: Visit picser.pages.dev for drag-and-drop uploads!
- Fork the repository: github.com/sh20raj/picser
- Connect to Cloudflare Pages:
- Visit Cloudflare Pages
- Connect your GitHub account
- Select your forked repository
- Deploy: Cloudflare will automatically build and deploy
- Optional: Add your custom domain
Benefits of self-hosting:
- β Complete privacy and control
- β Custom domain support
- β Free hosting on Cloudflare Pages
- β Global CDN included
- β Automatic deployments from GitHub
Web Interface:
- Visit picser.pages.dev
- Enter your GitHub credentials in the form
- Drag and drop an image or click to browse
- Get instant CDN URLs with multiple formats
API Integration:
- Visit picser.pages.dev/api-docs for complete documentation
- Use
https://picser.pages.dev/api/public-uploadendpoint - Send your GitHub credentials with each request
- Get 6 different URL formats for your uploaded image
Local Development:
- Configure your
.env.localwith your GitHub repository details - Run
npm run devand visithttp://localhost:3000 - Drag and drop an image or click to browse
- Get 6 different URL formats for your uploaded image
API Documentation:
- Visit
http://localhost:3000/api-docsfor complete API documentation - Test your GitHub configuration at
/api/test-config - Use
/api/public-uploadto upload images to any GitHub repository
Upload an image using the hosted API:
# Replace with your actual GitHub credentials
curl -X POST \
-F "file=@screenshot.png" \
-F "github_token=ghp_your_github_token" \
-F "github_owner=your_username" \
-F "github_repo=your_repo" \
https://picser.pages.dev/api/public-uploadResponse (JSON):
{
"success": true,
"filename": "screenshot-1704123456789.png",
"url": "https://cdn.jsdelivr.net/gh/user/repo@abc123/uploads/screenshot-1704123456789.png",
"urls": {
"jsdelivr_commit": "https://cdn.jsdelivr.net/gh/user/repo@abc123/uploads/screenshot-1704123456789.png",
"raw_commit": "https://raw.githubusercontent.com/user/repo/abc123/uploads/screenshot-1704123456789.png",
"github_commit": "https://github.com/user/repo/blob/abc123/uploads/screenshot-1704123456789.png"
},
"size": 142857,
"type": "image/png"
}β¨ That's it! Your image is now available globally via jsDelivr CDN with a permanent URL.
Branch-based URLs (may change if files are updated):
github: View file in GitHub web interfaceraw: Direct access to raw file contentjsdelivr: Fast CDN access with global caching
Commit-based URLs (permanent, never change):
github_commit: Permanent link to specific commit versionraw_commit: Direct access to specific commit versionjsdelivr_commit: CDN access to specific commit version
This application is optimized for Cloudflare Pages with Edge Runtime:
- Connect your GitHub repository to Cloudflare Pages
- Set build command:
npm run build - Set output directory:
.next - Add environment variables in Cloudflare Pages settings
- Deploy automatically on git push
Deploy easily on Vercel:
- Connect your GitHub repository
- Add environment variables
- Deploy with zero configuration
- Framework: Next.js 15 with App Router
- Styling: Tailwind CSS 4
- Icons: Lucide React
- GitHub API: Octokit/rest
- TypeScript: Full type safety
- Storage: GitHub repository + localStorage for history
This project uses next/font to automatically optimize and load Geist, a new font family for Vercel.
To learn more about Next.js, take a look at the following resources:
- Next.js Documentation - learn about Next.js features and API.
- Learn Next.js - an interactive Next.js tutorial.
You can check out the Next.js GitHub repository - your feedback and contributions are welcome!
The easiest way to deploy your Next.js app is to use the Vercel Platform from the creators of Next.js.
Check out our Next.js deployment documentation for more details.
