蠢卷栖萤

蠢卷栖萤

TG-Image: Turn Telegram into an unlimited image hosting service

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.


【Philosophical Wallpaper】Detective Conan - Dark Light and Shadow

1 Product Highlights#

Fast UploadOriginal QualityVisual Feast
Drag / Click / Paste / BatchTelegram storage, 2 GB single fileDark mode, 3D cards, smooth animations
Cross-Platform CompatibilityAccount SystemIntelligent Statistics
Desktop / Tablet / MobileIndependent GalleryCharted 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#

ToolPurposeAddress
Cloudflare AccountHosting web pages, HTTPSRegister
Telegram AccountStoring imagesMobile / Desktop client
Node.js ≥ 16Running deployment scriptsDownload

3.1 Obtain 2 "Keys"#

① Telegram Bot Token#

  1. Search for @BotFather on Telegram
  2. Send /newbot → Name it → Get
    123456789:AAHh-abcdefg...

② Telegram Channel ID#

  1. Create a new channel (private is fine) → Set the Bot as an administrator (message sending permission)
  2. 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#

ScenarioAction
Anonymous UploadDrag/Paste directly, no registration needed
After LoginPersonal gallery, tags, favorites, statistical charts
External Link FormatAutomatically copy Markdown / HTML / original link
Large Image PreviewClick → Top right "Original"

5 Frequently Asked Questions (FAQ)#

QA
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!
Loading...
Ownership of this post data is guaranteed by blockchain and smart contracts to the creator alone.