Skip to content

Twikoo

PicHost supports Twikoo and EasyImage 2.0 image upload — configure your comment system like EasyImage.

Twikoo settings

SettingValue
IMAGE_CDNeasyimage
IMAGE_CDN_URLhttps://your-domain/api/index.php
IMAGE_CDN_TOKENSame as global API_UPLOAD_TOKEN
  • Use your site hostname (admin domain) in IMAGE_CDN_URL
  • Generate the token in PicHost API or set API_UPLOAD_TOKEN

Upload endpoint

POST /api/index.php

FieldDescription
imageImage file
tokenGlobal API token (same as Auth-Token)
bash
curl -X POST "https://admin.example.com/api/index.php" \
  -F "token=YOUR_TOKEN" \
  -F "image=@./demo.png"

Files are stored under images/ and owned by the global token account (admin).

REST vs Twikoo

AspectREST /api/images/uploadTwikoo /api/index.php
AuthAuth-Token headerform token
ResponsePicHost JSONEasyImage-compatible JSON
TokenGlobal or personalGlobal only

Dual-domain

Point Twikoo uploads at SITE_BASE_URL; public images use IMAGE_BASE_URL. See Dual-domain separation.

See also