Summary
ImgLink media upload integration for Discourse with scoped API keys, retry handling, and admin diagnostics.
Repository Link
https://github.com/imglink12x/discourse-plugin
Install Guide
-
SSH into your Discourse container:
-
Add the plugin to your app.yml:
-
Rebuild the container:
-
Configure your ImgLink API key in Admin Settings (see Configuration below)
For detailed setup: https://imglink.cc/tools/forum-plugins
Features
-
Direct Upload from Composer — Upload images directly from Discourse post editor
-
Scoped API Keys — Uses limited-scope credentials; no full account access
-
Direct & Viewer Links — Returns both direct CDN links and image viewer URLs
-
Retry + Idempotency — Automatic retry logic for unstable connections; prevents duplicate uploads
-
Admin Diagnostics — Built-in health checks to validate API auth, connectivity, and upload permissions
-
BBCode Output — Automatic BBCode formatting for embedded posting
-
Error Logging — Detailed logs for troubleshooting upload failures
Configuration
Step 1: Create an ImgLink API Key
-
Log in to ImgLink (https://imglink.cc)
-
Navigate to Settings → API Keys
-
Create a new key with these scopes:
-
upload:create -
image:delete(optional, for cleanup workflows)
-
-
Copy the API key
Step 2: Add to Discourse Admin Settings
-
Go to Admin → Settings → Plugins
-
Scroll to ImgLink Settings
-
Paste your API key in the
imglink_api_keyfield -
(Optional) Set
imglink_api_endpointif using a custom ImgLink instance -
Save
Step 3: Run Diagnostics
-
Go to Admin → Plugins → ImgLink Settings
-
Click “Test Connection” to validate your configuration
-
You should see “✓ Connection successful”
Settings
| Setting Name | Type | Default | Description |
|---|---|---|---|
imglink_api_key |
String | (empty) | Your ImgLink API key with upload:create scope |
imglink_api_endpoint |
String | https://imglink.cc/api/v1 |
ImgLink API base URL (leave default unless self-hosted) |
imglink_max_retries |
Integer | 3 |
Number of retry attempts for failed uploads |
imglink_retry_delay |
Integer | 1000 |
Milliseconds to wait between retry attempts |
imglink_timeout_ms |
Integer | 30000 |
Upload request timeout (30 seconds) |
imglink_enable_diagnostics |
Boolean | true |
Enable admin diagnostic tools and logs |
imglink_enable_direct_links |
Boolean | true |
Return direct CDN links vs. viewer-wrapped links |
Version Compatibility: Discourse 2.8+ | Last Updated: March 2026 | Support: https://imglink.cc/tools/forum-plugins