Small utility to store and view encrypted images in GitHub repos.
- Upload images to a repo (encrypted)
- Save repos locally for quick access
- Browse images in a simple gallery
- Uses a GitHub Personal Access Token (PAT)
Just open the HTML files in a browser.
No build step, no dependencies.
- Go to Access and save your GitHub PAT
- Go to Upload to push images to a repo
- Go to Gallery to view saved repos
Your token needs:
-
Repository administration (admin) Used to create new repositories when uploading to a new repo.
-
Repository contents (contents) Used to read, create, and update files (i.e. upload and fetch images).
- Images are encrypted before upload
- PAT is stored locally (not sent anywhere else)
- This is a simple client-side tool (no backend)
- I’ve tried to obscure the PAT as much as possible, but requests are still sent with the raw token. If a browser extension or environment can inspect network requests, it can access the PAT.
- You enter your GitHub PAT and a passphrase on the Access page
- The PAT is encrypted in the browser using the passphrase
- The encrypted PAT is stored in local storage
- When an API request is needed:
- The passphrase is used to decrypt the PAT in memory
- The decrypted PAT is attached to the GitHub API request
- The raw PAT is never stored directly, but it does exist briefly in memory during requests
Upload:
- You select images on the Upload page
- A repo passphrase is provided
- Each image is encrypted in the browser using that passphrase
- The encrypted data is uploaded to GitHub as files
- A commit is created with those encrypted files
View:
- You open a repo from the Gallery
- The app fetches encrypted image files from GitHub
- You enter the repo passphrase
- Files are decrypted in the browser
- Decrypted images are rendered on screen
index.html– home/dashboardlogin.html– store PATupload.html– upload imagesgallery.html– repo listgallery-view.html– view images
I thought it would be fun.
Use an alt account for generating the PAT and storing images.
I can’t guarantee how GitHub might react to this usage.