Upload images to GitHub and get instant CDN URLs via jsDelivr. Perfect for developers who need reliable image hosting.
Send requests directly to our hosted API endpoint:
https://picser.pages.dev/api/public-upload
✅ Your credentials are used only for the upload
✅ Nothing is stored on our servers
✅ Direct GitHub API communication
Deploy your own instance on Cloudflare Pages:
✅ Complete privacy and control
✅ Free Cloudflare Pages hosting
✅ Custom domain support
Images are served via jsDelivr CDN with global caching and high performance
Commit-based URLs ensure your images are permanently accessible
Access your images from anywhere with multiple URL formats
/api/public-upload
Your own instance
picser.pages.dev/api/public-upload
Hosted version (recommended)
Parameter | Type | Required | Description |
---|---|---|---|
file | File | Yes | Image file to upload (JPG, PNG, GIF, WebP, max 100MB) |
github_token | String | Yes | GitHub personal access token |
github_owner | String | Yes | GitHub username or organization |
github_repo | String | Yes | GitHub repository name |
github_branch | String | No | Branch name (default: main) |
folder | String | No | Upload folder (default: uploads) |
Ready-to-use code snippets in multiple programming languages. Click any tab to view examples and copy the code.
1curl -X POST \
2 -H "Content-Type: multipart/form-data" \
3 -F "file=@/path/to/your/image.png" \
4 -F "github_token=ghp_xxxxxxxxxxxx" \
5 -F "github_owner=sh20raj" \
6 -F "github_repo=picser" \
7 -F "github_branch=main" \
8 -F "folder=uploads" \
9 https://picser.pages.dev/api/public-upload
10
11# Or use the hosted version directly:
12# https://picser.pages.dev/api/public-upload
1const formData = new FormData();
2formData.append('file', fileInput.files[0]);
3formData.append('github_token', 'ghp_xxxxxxxxxxxx');
4formData.append('github_owner', 'sh20raj');
5formData.append('github_repo', 'picser');
6formData.append('github_branch', 'main');
7formData.append('folder', 'uploads');
8
9// Use your own instance or the hosted version
10const response = await fetch('https://picser.pages.dev/api/public-upload', {
11 method: 'POST',
12 body: formData
13});
14
15const result = await response.json();
16console.log(result);
17
18// Or use hosted version directly:
19// const response = await fetch('https://picser.pages.dev/api/public-upload', {...});
1import requests
2
3files = {'file': open('/path/to/your/image.png', 'rb')}
4data = {
5 'github_token': 'ghp_xxxxxxxxxxxx',
6 'github_owner': 'sh20raj',
7 'github_repo': 'picser',
8 'github_branch': 'main',
9 'folder': 'uploads'
10}
11
12# Use your own instance or the hosted version
13response = requests.post('https://picser.pages.dev/api/public-upload', files=files, data=data)
14result = response.json()
15print(result)
16
17# Or use hosted version directly:
18# response = requests.post('https://picser.pages.dev/api/public-upload', files=files, data=data)
1{
2 "success": true,
3 "filename": "image-1703123456789.png",
4 "url": "https://cdn.jsdelivr.net/gh/sh20raj/picser@commit_sha/uploads/image-1703123456789.png",
5 "urls": {
6 "github": "https://github.com/sh20raj/picser/blob/main/uploads/image-1703123456789.png",
7 "raw": "https://raw.githubusercontent.com/sh20raj/picser/main/uploads/image-1703123456789.png",
8 "jsdelivr": "https://cdn.jsdelivr.net/gh/sh20raj/picser@main/uploads/image-1703123456789.png",
9 "github_commit": "https://github.com/sh20raj/picser/blob/commit_sha/uploads/image-1703123456789.png",
10 "raw_commit": "https://raw.githubusercontent.com/sh20raj/picser/commit_sha/uploads/image-1703123456789.png",
11 "jsdelivr_commit": "https://cdn.jsdelivr.net/gh/sh20raj/picser@commit_sha/uploads/image-1703123456789.png"
12 },
13 "size": 142857,
14 "type": "image/png",
15 "commit_sha": "a1b2c3d4e5f6",
16 "github_url": "https://github.com/sh20raj/picser/blob/commit_sha/uploads/image-1703123456789.png"
17}
Test the upload functionality with your own API credentials and files. This playground uses your GitHub token to upload images directly to your repository.
Drag & drop your image file here
or
Try uploading an image through our web interface or start using the API directly.