-
Step 1 · Create the bucket + basic settings
Pick a region, public-read / private-write, standard storage
An image host is really just a bucket whose files you can link to directly. In China the usual choices are Tencent Cloud COS or Alibaba Cloud OSS; elsewhere any S3-compatible storage or Cloudflare R2 works the same way.
Bucket checklist:
- Pick a region close to your readers — cross-region access is slower and costs more.
- Permissions: public read, private write. Others can view your images, but can't push files into your bucket.
- Skip "global acceleration" unless you genuinely have overseas readers — it's a paid extra.
- Storage class: standard. Infrequent-access and archive tiers are for cold data; image hosting is hot data.
Once the bucket exists you get a domain like
https://xxx-123456.cos.ap-guangzhou.myqcloud.com— that's the prefix for your direct image links.Checklist
- Bucket created with public-read / private-write
- You can build a test image URL and open it in a browser
-
Step 2 · Custom domain + CDN
Your own domain, HTTPS, CDN origin
The vendor's default
.myqcloud.comdomain works, but with two problems: it's long and branded, and without CDN the speed varies wildly between regions.Binding a domain:
- In the COS console, add your image domain (for example
img.example.com) as a custom origin domain, then CNAME it to the CDN domain the vendor gives you. - Turn on HTTPS (the vendor's free certificate or your own), otherwise browsers flag the site as "not secure".
Enabling CDN: add the bucket as the origin in the acceleration settings. CDN caches your images on edge nodes, so readers fetch from nearby — faster, and it cuts your bucket's outbound traffic bill.
Note: custom domains in mainland China normally require an ICP filing; a domain without one can't be used as your image domain.
Checklist
- Images load over HTTPS on your custom domain
- CDN status is enabled
- Speed is fine from different regions
- In the COS console, add your image domain (for example
-
Step 3 · Hotlink protection + cost control
Referer rules + traffic and size alarms + lifecycle rules
Two things kill an image host: someone hotlinking your images (burning your bandwidth) and a bill that runs away.
Hotlink protection (Referer check): configure it in the COS console to allow only your own domains (optionally blank referrers too). Any other site embedding your images gets a 403, so nobody can paste your images on their site and drain your traffic.
Cost monitoring:
- Set alarm thresholds for storage size and traffic, with email or chat notifications.
- Use lifecycle rules to auto-delete temporary images older than N days.
- Check the bill regularly: cost = storage + traffic + requests, and outbound traffic is usually the biggest line — CDN removes most of it.
A small image host costs a few dollars a month, but you don't want to discover the bill after it's been abused. Turn on hotlink protection and alarms from day one.
Checklist
- A non-whitelisted domain gets 403 on your images
- Traffic and size alarms are configured
- You can view the bill
-
Step 4 · Upload toolchain (drag, get a link)
COSCLI / ossutil on the CLI, or PicGo on the desktop
You can't open the web console for every upload — you need something fast.
Pick one:
- COSCLI / ossutil (CLI): the official command-line tools, good for batches. With keys configured:
coscli cp ./photo.jpg cos://your-bucket/2026/photo.jpg- PicGo (desktop, highly recommended): drag an image in and it uploads, then copies the direct link to your clipboard — perfect when writing. Supports COS, OSS, Qiniu and many others.
- Self-hosted uploader (Lsky Pro, Chevereto): your own web upload page, ideal if you want to offer image hosting to others.
While writing: screenshot → drag into PicGo → paste. The direct link is just your domain plus the path.
Checklist
- You uploaded an image and got a working direct link
- PicGo or the CLI is configured
- The link lands on your clipboard
-
Step 5 · Wire it into your site + backup + monetise
Serve all images from your host, back it up, keep keys secret, add affiliates
With the host running, use it — and earn a little from it.
Wire it in: serve every post image and site asset from your own bucket, so everything is managed and swappable in one place. To offer public image hosting, put an Lsky Pro front end on it.
Backup: the images are your asset. Use cross-region replication, or sync the bucket to another bucket or local disk periodically — never keep a single copy.
Monetise: put cloud-storage affiliate links on your image-hosting page or blog sidebar. Someone reading an image-hosting tutorial is about to open a bucket anyway, so the conversion is natural.
Security: keep API keys on your server or in PicGo's local config. Never put them in front-end JS — leak them and someone can delete your whole bucket.
Checklist
- Site images are served from your own host
- There is an off-site backup strategy
- Promotional placements are labelled
- No keys appear in front-end code