
ImgLink for SMF
The ImgLink SMF plugin provides a clean single-function integration for Simple Machines Forum 2.x. imglink_upload_smf() handles config validation, cURL multipart upload with configurable connect timeout, and response parsing in one call. Strict PHP 8 types, BOM-free source, and no Composer dependencies ensure full compatibility with SMF's bootstrap across both SMF 2.0.x and 2.1.x.
Requirements
- PHP 8.0 or higher
- SMF 2.0.x or 2.1.x
- cURL PHP extension
- ImgLink API key (free)
Classic community boards, hobby forums, guild sites
What's included
Installation Guide
Follow these steps to integrate ImgLink with SMF.
Copy to SMF Sources/
Copy the plugin file into SMF's Sources directory.
cp src/plugin.php /path/to/smf/Sources/ImgLink.php
Register hook in Admin
In SMF Admin → Packages or Hooks, register imglink_upload_smf as your upload handler.
Create config.json
Create config.json next to your plugin file with your credentials.
{
"apiBase": "https://imglink.cc",
"apiKey": "YOUR_KEY_HERE",
"timeoutSeconds": 30
}Call in your upload hook
In your attachment or post handler, call imglink_upload_smf().
$upload = imglink_upload_smf($tmpFile, $config); $url = $upload['url'];
Why host images on ImgLink?
Global CDN
Images served from a global edge network. Sub-100ms load times. No bandwidth cost to your forum server.
Scoped API Keys
One API key per forum. Revoke or rotate instantly. Keys never leave your config file — never hardcoded.
Retry Safety
Exponential backoff on every upload. Images never fail silently — retries handle transient network issues.
Ready to deploy ImgLink on SMF?
Download the plugin, add your API key, and go live in under 10 minutes. Free to use — no credit card required.



