Based on the xiyewuqiu/new-lmage repository, v2.5.0
Released on 2025-05-21, supporting new features such as data visualization, favorites, and drag-and-drop sorting.
1 Product Highlights#
Fast Upload | Original Quality | Visual Feast |
---|---|---|
Drag / Click / Paste / Batch | Telegram storage, 2 GB single file | Dark mode, 3D cards, smooth animations |
Cross-Platform Compatibility | Account System | Intelligent Statistics |
---|---|---|
Desktop / Tablet / Mobile | Independent Gallery | Charted upload trends, space usage |
2 30-Second Overview#
- Unlimited Capacity: Telegram backend, theoretically unlimited
- Global Acceleration: Cloudflare
- Zero Cost: Cloudflare Pages free hosting
- Open Source License: AGPL-3.0 + Commons Clause, secondary development allowed but no selling
3 10-Minute Deployment Guide#
3.0 Prerequisites#
Tool | Purpose | Address |
---|---|---|
Cloudflare Account | Hosting web pages, HTTPS | Register |
Telegram Account | Storing images | Mobile / Desktop client |
Node.js ≥ 16 | Running deployment scripts | Download |
3.1 Obtain 2 "Keys"#
① Telegram Bot Token#
- Search for @BotFather on Telegram
- Send
/newbot
→ Name it → Get
123456789:AAHh-abcdefg...
② Telegram Channel ID#
- Create a new channel (private is fine) → Set the Bot as an administrator (message sending permission)
- Send a message in the channel → Forward it to @VersaToolsBot → Get
-1001234567890
(do not omit the negative sign and 100)
3.2 One-Click Deployment#
# Clone the latest repository
git clone https://github.com/xiyewuqiu/new-lmage.git
cd new-lmage
# Install dependencies
npm install
# Log in to Cloudflare
npx wrangler login
3.3 Write Configuration#
Edit wrangler.toml
:
name = "tg-image" # Custom, xxx.pages.dev prefix
compatibility_date = "2024-05-01"
[vars]
TG_Bot_Token = "123456789:AAHh-abcdefg..." # ①
TG_Chat_ID = "-1001234567890" # ②
JWT_SECRET = "ChangeMeToRandomString" # Any complex string
3.4 Go Live#
npm run setup
Terminal returns:
✨ Successfully published your Worker to:
https://tg-image-xxxxx.pages.dev
Click to access!
3.5 (Optional) Bind Custom Domain#
Cloudflare Pages → Your Project → Custom Domain → Enter img.example.com
→ Follow prompts to add CNAME → Automatic SSL, effective in 1 minute.
3.6 Future Upgrades#
git pull origin main # Pull the latest code
npm run deploy # One-click redeploy
4 Usage Tips#
Scenario | Action |
---|---|
Anonymous Upload | Drag/Paste directly, no registration needed |
After Login | Personal gallery, tags, favorites, statistical charts |
External Link Format | Automatically copy Markdown / HTML / original link |
Large Image Preview | Click → Top right "Original" |
5 Frequently Asked Questions (FAQ)#
Q | A |
---|---|
Will Telegram ban accounts? | Official Bot API, comply with ToS, currently no cases |
Can multiple users share? | Just add the Bot to a public group for shared access |
Is migration troublesome? | Original files in the channel can be exported anytime, front end can switch domains with one click |
6 Open Source & Contribution#
- Repository:
https://github.com/xiyewuqiu/new-lmage
- License: AGPL-3.0 + Commons Clause (personal use/secondary development ✔, commercial sales ✘)
- Issues / PR / Stars are welcome!