Storing an image in Kodo is only the first step: reliable CDN delivery also requires a domain, HTTPS and cache settings. This guide uses a public test image to explain onboarding, format conversion, verification and billing; private files need a separate access design.
Prerequisites
Prepare a Qiniu account, a domain whose DNS you control, a Kodo bucket and a publicly readable test JPEG. Qiniu's CDN quick start requires account identity verification and domain ICP filing; HTTPS also needs a valid certificate. These are the requirements for that documented workflow, not a claim about every region or account.
Record the test object's key and bucket region, and choose a storage class suited to the access pattern. Never put secret keys in a web page or public repository; for direct client uploads, have a trusted backend issue a restricted, short-lived upload token. Objects in a public bucket may be readable by anyone with the link, so do not use sensitive data.
Configure the domain and cache
The diagram distinguishes edge hits from origin fetches. Whether image processing parameters survive depends on the domain's cache configuration, not a universal CDN rule.
- Create a Kodo bucket and upload a test image; record its object key. Back up existing production objects before overwriting them.
- Add a CDN domain in domain management, select Qiniu storage as origin and choose the bucket. Select the applicable acceleration region and use case, then configure the HTTPS certificate and renewal. Once the console provides a CNAME, add it at your DNS provider.
- Choose a TTL appropriate to your update frequency and inspect URL parameter rules. Qiniu's cache documentation says ignoring all parameters also disables features such as image processing; retain and test the parameters you need. Retaining irrelevant parameters can reduce the hit rate.
- Once the domain is active, request the test object from a client. Before production cutover, retain the previous DNS record, resource URL and certificate configuration. On failure, restore the previous DNS or resource URL, allowing for DNS and browser cache delays.
Verify image processing and updates
Replace cdn.example.com and the path below with your domain and public JPEG object. The example uses Qiniu's imageMogr2 format conversion; enable image processing as required for your integration. The documented synchronous-processing source-image limit is 20 MB, alongside other restrictions (checked 2026-11-28).
dig +short CNAME cdn.example.com
curl -sS -o /dev/null -D - "https://cdn.example.com/photos/hero.jpg?imageMogr2/format/webp"
Verify that dig returns the CNAME shown in the console; a successful HTTP response with Content-Type: image/webp means the server returned WebP. If it fails, check domain status, certificate, object path, processing settings and parameter retention. Correct DNS alone does not establish that origin fetch or processing works. Conversion does not guarantee a smaller file.
After replacing an object under the same key, an old edge copy may remain valid. Prefer a new versioned object key; if the URL must stay unchanged, submit a refresh for the actual URL in the CDN console, check task status, and then compare GET response content or its digest. Neither a successful submission nor a changed ETag alone proves every edge has updated. See CDN Cache Strategy for cache keys and invalidation.
Account for costs
Estimate these items separately using Qiniu's Kodo metering guide and CDN pricing documentation, checked 2026-11-28. CDN egress alone is not the whole bill.
| Item | Meter and conditions to check |
|---|---|
| Object storage | Region, storage class and monthly average capacity; infrequent and archive classes can add retrieval and early-deletion fees |
| CDN delivery | Client traffic or applicable bandwidth billing, acceleration region, protocol and tiers |
| Origin traffic and requests | Kodo origin traffic on cache misses and object-storage read/write requests |
| Image processing | Processing mode, feature and call volume; advanced formats or other add-ons may be charged separately |
Budget as estimated usage times the applicable unit price for each item, less any eligible allowance or package; check tiers, minimum storage periods and eligibility separately. Actual charges depend on traffic, cache hits and region, so one egress rate cannot determine the total. See CDN Cost Control for further usage breakdowns.
For example, the official table lists the first mainland China HTTPS download tier at CNY 0.28/GB. Assuming 1 TB (1,024 GB) in a calendar month entirely within that tier and no package, estimated CDN delivery is CNY 286.72. This is not the total: add storage, origin traffic, requests and applicable processing charges. Prices and package eligibility can change.
Limitations
- Private buckets, signed URLs and CDN caching need a separate design: enforce authorization at the edge so a cached authorized response is not reused by other users. Do not assume origin authentication protects cache hits.
- Image-processing syntax and authentication depend on Qiniu interfaces; another storage or CDN provider may not accept the same URL parameters, signatures or cache rules.
- Coverage, performance and protection depend on the purchased product, region and configuration. Test from audience locations and assess whether the threat model requires additional security products.
FAQ
Why does the converted URL still return the original image?
Check whether the CDN retains the processing parameters first. Confirm that processing is configured for the domain and bucket, then check source-image format and size limits. Request the original and processed URLs separately, compare status and Content-Type, and inspect cache rules and refresh tasks.
Can I use the public URL example for private images?
Not unchanged. Private content requires an appropriate Qiniu authorization method, expiry and CDN edge authorization design. Test unauthorized requests and cache hits after authorization expires; do not put real sensitive images in a public bucket before those controls are validated.
Why can clients still see the old image after a refresh?
Submitting a refresh does not mean every cache is updated. Check task status and confirm the request uses the right domain, object path and processing parameters. Browsers and other intermediate caches can also retain an old response; versioned object keys reduce ambiguity from overwriting the same URL.
Related Providers
- Qiniu Cloud: check product scope and onboarding when combining Kodo, CDN and image processing.
- UPYUN: check its interfaces and billing conditions when comparing object storage and image delivery.
Community & Resources
- CDN Acceleration: articles on caching, delivery and onboarding.
- Website CDN Setup Guide: further checks for DNS, certificates and launch.
Original source: 16IDC original ↗