Skip to content
HomeWebAppSetDocsAbout
🌐 Auto English 简体中文 繁體中文 Español Français Русский العربية Português Deutsch 日本語 한국어 हिन्दी

Image Hosting

Moraya supports uploading images to external hosting services, replacing local paths with permanent URLs. Configure your preferred image host in Settings (Cmd+,) > Images.

Supported Providers

ProviderAPIAuthentication
SM.MShttps://sm.ms/api/v2/uploadBearer Token
Imgurhttps://api.imgur.com/3/imageClient-ID Header
GitHubGitHub Contents APIBearer Token (PAT)
Qiniu KodoQiniu Upload APIAccess Key + Secret Key
Aliyun OSSOSS REST APIAccessKey ID + AccessKey Secret
Tencent COSCOS XML APISecretId + SecretKey
AWS S3S3 REST APIAccess Key + Secret Key
Google Cloud StorageJSON APIService Account Key
CustomUser-defined endpointBearer Token + Custom Headers

Adding a Provider

Click “Add Host” in Settings > Images to see the provider selection menu. Providers are grouped by category:

Configuration

SM.MS

  1. Register at sm.ms and get your API token
  2. Select SM.MS as the provider in Settings > Images
  3. Paste your API token

Imgur

  1. Register an application at Imgur API
  2. Select Imgur as the provider
  3. Enter your Client-ID

GitHub

  1. Create a Personal Access Token with repo scope
  2. Select GitHub as the provider
  3. Enter your repository URL, branch, upload directory, and token
  4. Choose CDN: raw.githubusercontent.com (direct) or jsDelivr (CDN-accelerated)

Qiniu Kodo

  1. Register at Qiniu Cloud and create a storage bucket
  2. Select Qiniu Kodo as the provider
  3. Enter your Access Key, Secret Key, Bucket name, and Region
  4. Optionally set a custom domain for CDN access

Aliyun OSS

  1. Register at Alibaba Cloud and create an OSS bucket
  2. Select Aliyun OSS as the provider
  3. Enter your AccessKey ID, AccessKey Secret, Bucket, and Region (e.g., oss-cn-hangzhou)
  4. Optionally set a custom domain

Tencent COS

  1. Register at Tencent Cloud and create a COS bucket
  2. Select Tencent COS as the provider
  3. Enter your SecretId, SecretKey, Bucket, and Region (e.g., ap-guangzhou)

AWS S3

  1. Create an S3 bucket in your AWS Console
  2. Select AWS S3 as the provider
  3. Enter your Access Key, Secret Key, Bucket, and Region (e.g., us-east-1)

Google Cloud Storage

  1. Create a bucket in your Google Cloud Console
  2. Select Google Cloud Storage as the provider
  3. Enter your Service Account Key, Bucket name, and Project ID

Custom

  1. Select Custom as the provider
  2. Enter your upload endpoint URL
  3. Configure any required headers as a JSON object

Upload Methods

Manual Upload

Right-click an image in the editor and select “Upload to Image Host”. The local path will be replaced with the returned URL.

Auto Upload

Enable Auto Upload in Settings > Images. When you paste or drag an image into the editor, it will be automatically uploaded to your configured service.

Test Upload

Click “Test Upload” in Settings to verify your configuration. Moraya sends a tiny 1×1 red pixel PNG to test the connection.

Import from Publish Targets

If you’ve configured a GitHub publish target (see Publish Targets), you can import its repository settings directly into the GitHub image hosting configuration with one click.